Je cette entitéLimiter le nombre d'enregistrement d'une jointure
@Entity
public class RentAmount {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long rentAmountId;
private BigDecimal unpaidBalance;
private BigDecimal cashAdvance;
private BigDecimal totalRentAmount;
private LocalDate paymentRentDueDate;
private LocalDate paymentDueDate;
@OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY)
@OrderBy
private Set<RoomPayment> roomPaymentList;
@OneToOne
private Lodger lodger;
}
Ma requête
select r from RentAmount r Join fetch r.lodger l join fetch l.bailList b join fetch r.roomPaymentList p where r.paymentRentDueDate <= :date and b.paymentPeriod=:paymentPeriod order by r.rentAmountId
RoomPaymentList peut être très grand, je cherche un moyen de limiter le nombre d'enregistrement retourné.
Existe-t-il un moyen de limiter le nombre de valeur de roomPaymentList?
ya exactement, jpa semblent très limitées. –