This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

eager fetching of lazy formulas via criteria api  RSS feed

Alexey Zhukov
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have simple entity with lazy @Formula property:

I made instrumentation for this class and it works fine.
Sample code for testing:

Unfortunately, the method ((TestEntity)o).getCustom() invokes an additional select-statement for fetching formula:

When i use this code:

I receive only one select-query execution, but result is List of Object[]. This is not useful.
How can i get List of TestEntities with eagerly fetched custom fields?

PS. Sorry for my English.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!