Open HansLoibner opened 1 month ago
Related code snippets:
@Entity(name = "SalesQuotationTable") @Table(name = "SalesQuotationTable") public class SalesQuotationTableEntity { @Column(name = "custAccount", length = 10) private String custAccount; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "custAccount", referencedColumnName = "custAccount", insertable = false, updatable = false) private CustTableEntity custTableEntity; }
@Entity(name = "CustTable") @Table(name = "CustTable") public class CustTableEntity { @Column(name = "custAccount", length = 10) private String custAccount; }
First things first: The LIMIT and OFFSET is only generated in case module odata-jpa-processor-cb is used. The JPA processor works fine also without it. Please remove it form your pom.xml.
The basic idea using sub-queries for expands is to avoid a generation of large select statement. This would be a risk using the keys from the result of the super originated query. As JPA does not support LIMIT and OFFSET for sub-queries, an own criteria builder was written, which generates parameterized native queries. In case this is accessible, it is used. By removing odata-jpa-processor-cb from the pom, it is no longer in the class pass.
I keep the issue open as a anchor to thing about a solution with odata-jpa-processor-cb
Hello,
we are using: