-
Notifications
You must be signed in to change notification settings - Fork 869
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
add support for sequence (nextval) on insert of new record #41
Comments
I added a convenience file with common Expressions :
Is this sufficient? |
Released in 2.2.5 |
I think that this is not enough though. When I try to use the NEXTVAL with Derby it throws error. At some point when I try to execute an Update query and set a field to a value of a sequence (JPAQueryFactory.set(qDoc.documentGenerationTrackingId, s)) |
nextval is not supported in Querydsl JPA, that's why you get an exception. Could you provide the stacktrace for the NPE? |
This is the stack trace: java.lang.NullPointerException The is how the sequence is created: |
Now you can create a sequence by using a TemplateExpression...
Expression nextCustomerId = TemplateExpressionImpl.create(String.class, "nextval('customer_id_seq')");
Could this be structurally resolved within the framework?
https://groups.google.com/forum/#!topic/querydsl/k5uKUq4DngM
The text was updated successfully, but these errors were encountered: