Quote:
You mean Criteria query with projections?
No. Thats not what I said.
Quote:
As for EAGER type unfortunally I can't change it to LAZY for business logic reasons.
Fetching data on a per business use case is the right thing to do no matter what business requirements have. There is no such thing o having a business use case that tells the data access layer to fetch more data than needed.
Quote:
So if i don't use ResultTransformer because of its deprecation
You can still use it. The deprecation marks that it ill be modified in 6.0. However, many other things will change as well, so the ResultTransformer is probably the least to worry about.
Quote:
I must manually move logic of instantiating my classes B and C depends of discriminator field.
Well, you are supposed to fetch DTOs, not entities for a DTO projection, and choosing the object type is not a tedious process at all.