-
Notifications
You must be signed in to change notification settings - Fork 634
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
JPA offset storage fails on PostgreSQL #453
Comments
Apparently Slick doesn't support
@TimMoore what PG version did you use? |
@ignasi35 I was using pg 9.6, but I think it's better to stick with what Slick supports by default. It emulates upsert with a compound statement, and I think that's totally fine aside from the fact that it changes the statement bind parameters. @jroper made the brilliantly simple suggestion of matching on the Slick driver class and dispatching to different binding logic (similar to what I'll also follow up with Stefan to see if there's a cleaner way to do this sort of thing, or whether he'd be receptive to a pull request that adds one. It would be nice if Slick could decouple logic for building and binding statements from actually running them, but as far as I can tell, there is no support for this currently. |
Fixed for 1.3.0-RC2 |
Lagom Version
1.3.0-SNAPSHOT
API
Java
Expected Behavior
jpa-example-postgresql-hibernate
sbt runAll
Actual Behavior
The new chirp does not appear after reloading the page.
This error is logged on the console:
Explanation
Slick's PostgreSQL driver does not support an atomic
insertOrUpdate
operation:This means that the naive attempt to bind parameters to the offset update query in
JpaReadSideImpl.java
is not database-independent.The text was updated successfully, but these errors were encountered: