Comments (6)
Can you try .leftJoin(companyInvoiceDataPublisher, companyInvoiceDataPublisher)
?
This explicitly binds the join to the alias companyInvoiceDataPublisher
which hopefully triggers the criteria renderer to reuse the alias from the outer query.
from blaze-persistence.
@jwgmeligmeyling, No luck! Still generating same query:
select p1_0.id,p1_0.account_number,p1_0.bic,p1_0.city,p1_0.company_name,p1_0.country,p1_0.currency_id,p1_0.deleted_at,p1_0.iban,p1_0.invoice_type,
p1_0.netsuite_vendor_id,p1_0.postal_code,p1_0.street,p1_0.term,p1_0.vat_number
from publisher_invoice_data p1_0 left join company_invoice_data_publisher c1_0 on (p1_0.id=c1_0.invoice_id)
where p1_0.id in
((select * from ((select p3_0.id from publisher_invoice_data p3_0 left join company_invoice_data_publisher c2_0 on (p3_0.id=c2_0.invoice_id)
where p3_0.deleted_at is null and c2_0.publisher_id in
(select p6_0.id from publisher p6_0 where p6_0.name like ? escape '!' or cast(p6_0.id as char) like ? escape '!')
group by p3_0.id order by p3_0.id desc limit 10)) tmp
))
order by p1_0.id desc
I changed to:
PagedList<PublisherInvoicing> publisherInvoicingPagedList = new BlazeJPAQueryFactory(entityManager, criteriaBuilderFactory)
.selectFrom(publisherInvoicing)
.leftJoin(companyInvoiceDataPublisher, companyInvoiceDataPublisher)
.on(publisherInvoicing.id.eq(companyInvoiceDataPublisher.companyInvoiceDataPublisherPk.publisherInvoicing.id))
.where(booleanBuilder)
.orderBy(orderBySpecifier)
.fetchPage((int) pageRequest.getOffset(), pageRequest.getPageSize());
from blaze-persistence.
Hello @beikov ! Any suggestion, please?
from blaze-persistence.
I added this in the root comment:
And blaze-persistence configuration is:
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
@Lazy(false)
public CriteriaBuilderFactory createAdminCriteriaBuilderFactory() {
CriteriaBuilderConfiguration config = Criteria.getDefault();
config.setProperty("com.blazebit.persistence.inline_count_query", "false");
return config.createCriteriaBuilderFactory(adminEntityManagerFactory);
}
from blaze-persistence.
No solution yet!
from blaze-persistence.
The other join is added through an implicit join. I'm not sure where the implicit join is generated, but it appears to be from blaze-persitence-core
and not the Querydsl integration.
You can still try:
.leftJoin(association). defaultJoin()
To force a default join being rendered so that hopefully Blaze-Persistence pick the alias up in the subquery.
If that doesn't fix it we'll need a reproducer (my guess would be that this is reproducible with just core and not the querydsl integration).
from blaze-persistence.
Related Issues (20)
- Re-using ObjectMapper from spring-boot for EntityViewAwareMappingJackson2HttpMessageConverter leads to issues HOT 3
- Allow multiple named subqueries for @MappingSubquery
- Optimization of logging in the AnnotationUtils Utility Class HOT 1
- FR: Support field-EntityView deserializatin for DTOs which are non-entity views
- Expose EntityViewAwareMappingJackson2HttpMessageConverter as a Bean to support re-usage for http-clients
- Property naming strategy for Jackson integration does not work HOT 3
- How to ignore a certain `Getter` in EntityView? HOT 1
- SubviewAttributeFlusher always cascade deletes
- Exception thrown when using LocalDate in an EntityView being fetched using the Multiset strategy
- Startup error with Spring Boot 3.3.0 and Blaze Persistence Repositories HOT 5
- "No viable alternative at input" error near 'entity_function'
- Exception thrown when using subQuery + pagedList
- Fetching of MULTISET attribute not working HOT 3
- Question. Can i use fields mapped as @Convert in multiset mode? HOT 1
- Cannot invoke "EntityType.getName()" because the return value of "JoinNode.getTreatType()" is null HOT 1
- Pagination in queries that join on an @OneToMany or @ManyToMany attribute return duplicate results HOT 1
- IS NOT NULL not possible in correlationExpression HOT 3
- Exclude Certain Attributes in View HOT 2
- Simple query with an EXISTS clause and pagination adds an unnecessary inner ID query HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blaze-persistence.