Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1.   // mmma9 JoinFetcher (no duplicates generated: if not -> setDistinct(true))
  2.   public static <X> void JoinFetcher(FetchParent<X, ReplenishmentEntity> fetchParent) {
  3.     // Important: Here use ONLY JoinType.LEFT
  4.     // (even if the relation is required/1-1, because, recursively, this method can be called from a
  5.     // parent entity on an optional relation)
  6.     final javax.persistence.criteria.Fetch<ReplenishmentEntity, WarehouseEntity> warehouseFetch =
  7.         fetchParent.fetch(ReplenishmentEntity_.warehouse, JoinType.LEFT);
  8.     WarehouseEntity.JoinFetcherFromReplenishment(warehouseFetch); // (no duplicates generated)
  9.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement