You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @mechero ,
The problem is I cannot persist object due to "null pointer exception" with column *ID. I don't think it's due to the difference in version because I already tried using your existing code.
Also from this post of thoughts-on-java. We should use GenerationType.SEQUENCE because it's better in term of performance and it will work on all versions of hibernate.
I'm not saying it's not better to use it, but I need to comment the code to indicate from which version of [Hibernate / Spring Boot / other libraries] the code doesn't work anymore. Keep in mind that this repo is referenced from a book that is "static" between editions so it needs to be very clear in comments what differs from the edition and why it's been changed.
This was certainly working by the time the book got released so there must be a difference somewhere.
I got problems with the default generated strategy
GenerationType.AUTO
, I addGenerationType.SEQUENCE
forthen everything works just fine.
Please verify this issue and allow me to create a new PR if my solution is correct.
The text was updated successfully, but these errors were encountered: