Save « Insert « JPA Q&A





1. Problems with inserts (saves) in Hibernate 3.1.3    forum.hibernate.org

Hiyas, I am having some problems with creating new objects in the db with Hibernate 3.1.3. (I know this version is a little dated but it's what the project is based on.) I am trying to create new objects in a transactional context. I have the following scenario: Code: public boolean startFamily(parentId, Set> childrenInfo) { try { ...

3. save( insert/update) not working    forum.hibernate.org

Hi I am using WSAD5 and for querying of the records is working fine using hibernate but while save I am getting following error. Any Help appreacited [9/17/03 15:27:04:469 EDT] c9bc899 TableGenerato E net.sf.hibernate.id.TableGenerator could not read a hi value [9/17/03 15:27:04:469 EDT] c9bc899 TableGenerato E net.sf.hibernate.id.TableGenerator TRAS0014I: The following exception was logged java.sql.SQLException: [IBM][SQLServer JDBC Driver][SQLServer]Line 1: FOR UPDATE clause ...

4. Saving and inserting objects    forum.hibernate.org

Hi all. I just barely started using Hibernate and ran into the following problem. I have data, business, and presentation layers. Data layer classes are generated automatically and present simple "bean" classes. We then create business classes ourselves. Presentation layer calls query methods from the business classes. A session is opened and closed every time a business object method is executed. ...

5. save slowing down with 'massive' (more than 1000) inserts    forum.hibernate.org

Hibernate version: 2.1.6 Mapping documents: There are 100 of them... but problem certainly not related to mapping Code between sessionFactory.openSession() and session.close(): Transaction txLocal = session.beginTransaction(); while loop - create the object long t1 = System.currentTimeMillis(); // I tried to beginTransaction here but it was a bit slower. session.save(patient); //session.flush(); // removed for seems useless and slows even more txLocal.commit(); long ...

6. I can save (insert data) but can't update or delete    forum.hibernate.org

My problem is that i can insert data but when i tried to update or delete, anything appens : the execution is finished welled with any exception but my data is not updated Hibernate version: 2.1.7.c [b]Mapping documents:

7. save() method first make insert and then update call why?    forum.hibernate.org

I am using session.save() method to insert data. I noticed that hibernate first call an insert statement and then an update statement for each save() call. I am not sure why hibernate is making an update call to database. [b]My question is can i disable this update call and just have an insert call to database. I feel this update is ...

8. Forcing hibernate to insert a new row on save    forum.hibernate.org

I have a parent-child relation with cascade="all-delete-orphan" and I want to insert a new database row (for both the parent and all its children), every time the parent is made persistent. I tried to solve the problem by using session.merge(). This seems to work well, but one of my properties in the parent is a custom user type and everytime I ...





10. Bulk insert/save possible?    forum.hibernate.org

11. 1 insert and 2 update statements for a save???    forum.hibernate.org

Author Message radar001 Post subject: 1 insert and 2 update statements for a save??? Posted: Fri Sep 25, 2009 3:58 pm Newbie Joined: Thu Sep 24, 2009 10:32 am Posts: 3 Hello. The developers in out group is running into an interesting situation. When we try to persist an entity object (it's called ClaimCase on our end) using the ...