-
-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Description
Ebean perfectly supports fetching partial entities.
But it feels very error prone to return a partially loaded object for further processing.
Someone can accidentally access unloaded field and trigger lazy loading query.
I think it is a good idea to introduce a dto in such cases to prevent additional queries.
If someone wants to access an unloaded field he will be forced to update query and dto.
But currently ebean supports only plain dtos. This is not convenient to construct nested projections from a flat resultset manually.
It is possible to define new entity with @View annotation and map it to the same table, but it is not feels right.
May be a better option exists, can you explain, please, how do you solve such problems?
Metadata
Metadata
Assignees
Labels
No labels