primary key « ID « JPA Q&A





1. ID (primary key) is incremented even though save is failed.    forum.hibernate.org

I have this strange behavior. I would appreciate if you can help me out. I have a user table in mysql database. In my application, I am creating new users. Here is the scenario: Let's say user X comes and creates an entry in database and ID (primary key, auto incremented) of 1 is assigned. Now the user X tries to ...

2. choose an id type for the primary key    forum.hibernate.org

hi, i'm writing a framework and that has some domain-objects. because i'm unexpierenced in respect to hibernate, i don't know about the right choice when picking an id-type (Long? Integer? String? ...). so i decided to leave this choice to the framework user by supplying the id-type as an generic parameter for every domain class. now i'm wondering, if this is ...