crnk-project / crnk-framework

JSON API library for Java
Apache License 2.0
287 stars 156 forks source link

Implementation of javax.persistence.EntityGraph with Crnk #840

Open prashantjain110 opened 2 years ago

prashantjain110 commented 2 years ago

Hi Team,

We have lot of JPA relations in our application because of that when we fire findAll() internally it fires lot of queries because of that the response time is in minutes, We have implemented EntityGraph with basic JPA code and now there is only single query is getting fired with all the joins.

Can we integrate javax.persistence.EntityGraph with Crnk?

Thanks in advance.

prashantjain110 commented 2 years ago

@remmeier Can you please help us. we are trying solve the N+1 select query problem: N+1 select Query issue We found below solution:

  1. Use EntityGraph
  2. Using Join fetch in the query

My Question to you is can we implement below points with Crnk :

  1. EntityGraph
  2. can we write custom named or native query with crnk