Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression serialization on subqueries #64

Open
nlippke opened this issue Jun 13, 2022 · 1 comment
Open

Expression serialization on subqueries #64

nlippke opened this issue Jun 13, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@nlippke
Copy link

nlippke commented Jun 13, 2022

It would be great if expression serialization also works on subqueries or CTE-queries. At the moment it looks like that it's not going to work because the serializer expects an incompatible BaseQueryBuilder:

java.lang.ClassCastException: class com.blazebit.persistence.impl.FullSelectCTECriteriaBuilderImpl cannot be cast to class com.blazebit.persistence.BaseQueryBuilder (com.blazebit.persistence.impl.FullSelectCTECriteriaBuilderImpl and com.blazebit.persistence.BaseQueryBuilder are in unnamed module of loader 'app')
	at com.blazebit.expression.declarative.view.ManagedViewTypeCollection.add(ManagedViewTypeCollection.java:62)

if doing something like

cteBuilder = fullCriteraBuilder.fromSubquery(MyCte.class);
ExpressionSerializer<WhereBuilder> serializer = expressionService.createSerializer(WhereBuilder.class);
serializer.serializeTo(serializerContext, predicate, cteBuilder);
@nlippke nlippke changed the title Expression on Subqueries Expression serialization on subqueries Jun 13, 2022
@beikov beikov added the bug Something isn't working label Jun 13, 2022
@beikov beikov self-assigned this Sep 16, 2022
@beikov
Copy link
Member

beikov commented Sep 16, 2022

This will require to raise the required minimum version of Blaze-Persistence to 1.6.8 after Blazebit/blaze-persistence#1537 is fixed, but should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants