ID « Stored Procedure « JPA Q&A





1. auto generated Id with stored procedure    forum.hibernate.org

Hi I would to know if it is possible to use a stored procedure to insert new values having the database generating the id? My following example doesn't work. Hibernate version: 3.0.1 Mapping documents: public class Product { private long id; private String name; public long getId() {return id; } public String getName() {return name;} public void setId(long string) {id = ...

2. id assigned from stored procedure    forum.hibernate.org

in our project is requirement to use for each db operation stored procedures and assign identifiers from sequences (oracle). we use id generator of type "sequence" and for the insert we defined custom statement - call of the stored procedure. but problem is, that each save process requires two calls to the database: 1. sequence.nextval 2. call of stored procedure it ...

3. Generated ID from stored procedure    forum.hibernate.org

5. org.hibernate.id.enhanced.TableGenerator and stored proc    forum.hibernate.org

Hi, I am using the org.hibernate.id.enhanced.TableGenerator using the pooled optimizer with an increment size of 100 to improve the performance of doing inserts. Originally I was using identity column for the id and while it worked there seemed to be an additional select being performed to get the id value and set it in the object. This also prevents the use ...