-
Notifications
You must be signed in to change notification settings - Fork 37
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
Postgresql and default #61
Comments
OK. This is a working java solution.
|
I actually use the Java solution in my apps because it solves a problem with batch inserts. The postgres jdbc driver does not return generated ids in the correct order when you do a batch insert. For single inserts add the @id and @GeneratedValue annotations to your primary key. See the docs. Reopen this issue if that doesn't solve the problem. |
When the column is a primary key, annotations work as expected, but what to do when the column is NOT the primary key? @GeneratedValue works only with Long value and means something as 'auto increment', right ? So the java solution is only working solutions |
Are you using the most recent version of Norm? 1.0.4. There were a few changes to the way generated values are returned. Try it with just @GeneratedValue. If that doesn't work, I'll have a look at it. |
Hi. I still cannot catch this situation.
table column:
verification_hash uuid DEFAULT uuid_generate_v1() UNIQUE
POJO:
When the insert method is called, column verification_hash is null.
I will try to implement my own JPA serialization for that or am I doing something wrong? Missing some annotation or something?
Thx
The text was updated successfully, but these errors were encountered: