Issues while replacing hibernate create criteria with JPA criteria
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
Hi All, In my project we have extensively used hibernate criteria, which has now deprecated in newer releases. I tried to replace the same with the JPA criteria but faced some below mentioned issues:
Select query will be involved for every sub-entities defined in the parent entity class.
Correct joins are not in place, since in hibernate criteria we define everything in an entity class. By using fetch and join method we explicitly needs to define the entities till it's depth.
Using graph we can define the depth of entities in the parent entity class.
My question is when we already define in the entity class then why we needs to do these all extra things.
Please suggest the best solution on this, I didn't found any proper solution on this.
Regards,
Nitin Jain
Contributor guide
Research direction
Start by clarifying whether this is a Grails issue or an application migration question involving Hibernate Criteria and JPA Criteria. The report provides no files, tests, entity definitions, or reproducible query; a useful outcome would be a focused reproduction and a documented supported behavior or migration path for fetch, join, and entity graph usage.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100