Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex Types with Floor and advanced query #456

Closed
claudneysessa opened this issue Dec 21, 2020 · 1 comment
Closed

Complex Types with Floor and advanced query #456

claudneysessa opened this issue Dec 21, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@claudneysessa
Copy link

claudneysessa commented Dec 21, 2020

hello my friends, I use FLOOR I think it's a fantastic tool but I have the need to create complex types and advanced query.
With it in my case I need to make objects with up to 3 levels.

Could someone give me a light?

Example:

class Order
{
int orderId;
List items;
}

class Order Items
{
int orderId;
int itemId;
List components;
}

class ItemsComponents
{
int orderId;
int itemId;
int componentId;
}

I would like to bring everything in a single object where it would be possible to access and persist, update or even delete it through the PAI object.

I need to access the elements of the parent object as follows.

Example:
order.itens [2] .components [1] .componentId

However, it would be interesting if this was loaded together and called the parent object [Order]

If anyone has a solution link or can help me I would be very grateful!

@claudneysessa claudneysessa changed the title Complex Types with Floor Complex Types with Floor and advanced query Dec 21, 2020
@mqus
Copy link
Collaborator

mqus commented Apr 23, 2021

I think you want a combination of @embedded (#9) and @Relation (#47), both of which are not implemented yet.

But I also want to stress, that floor will probably never be able to map operations on that object to the database (e.g. removing an element from the list will automatically remove it in the database). It did sound a little like you meant it that way, not sure if you meant that ;) .

So as this is mainly a duplicate of the mentioned tickets, I will close this issue. Feel free to reopen if you think this decision was wrong :)

@mqus mqus closed this as completed Apr 23, 2021
@mqus mqus added the duplicate This issue or pull request already exists label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Development

No branches or pull requests

2 participants