Results 1 to 2 of 2

Thread: QueryDSL eager load

  1. #1
    Join Date
    Jun 2008
    Posts
    11

    Default QueryDSL eager load

    Is there a way to eager load a JPA association with Spring Data and QueryDSL?

    I'd like to map all relationships as lazy, and then eager load only the relevant ones per query.

    It looks like it's possible to do this with JPA Criteria Specifications, and with the @Query annotation we can always specify INNER JOIN FETCH, but I can't find a way to do it with QueryDSL.

    QueryDSL's JPAQuery supports inner join, but that's not exposed by Spring Data, right?
    Last edited by bradcupit; Feb 10th, 2012 at 09:02 AM.

  2. #2
    Join Date
    Jun 2008
    Posts
    11

    Default

    Oliver mentioned here that fetch groups would probably be added in JPA 2.1 and Spring Data would add them at that time. However, it doesn't look like fetch groups are on the JPA 2.1 agenda anymore :-(

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •