Joined: Thu Oct 09, 2003 6:57 am Posts: 17 Location: France
|
Hi all,
Firstly, I use Hibernate 2.1 and Java 1.4.2.
I have forum which contains a collection of forumMessages
<set name="forummessages" lazy="true" inverse="false" cascade="all-delete-orphan" order-by="date_message" > <key> <column name="ref_forum" /> </key> <one-to-many class="com.newcompany.business.Forummessage"/> </set>
My code for find a forum is :
Code: public Forum findForum(Conflict conflict, String type) throws Exception { Forum forum = null; try { Session session = HibernateSession.currentSession(); HibernateSession.beginTransaction(); session.flush();
if (!session.contains(conflict)) session.load(conflict,conflict.getId()); Query query = session.createQuery("from forum in class Forum where forum.name= ? and forum.conflict.id=?"); query.setString(0,type); query.setString(1,conflict.getId().toString()); forum = (Forum) query.uniqueResult(); if(forum!=null) Hibernate.initialize(forum.getForummessages()); HibernateSession.endTransaction(false); } catch (HibernateException e) { try { HibernateSession.closeSession(); } catch (HibernateException e1) { throw new DataAccessException(e1.getMessage(), e1.getCause()); } throw new DataAccessException(e.getMessage(), e.getCause()); } return forum; }
So when I get my forum I initialize the collection. Now, my code for save a forum is : Code: public void saveOrUpdateForum(Forum forum) throws Exception{ try { Session session = HibernateSession.currentSession(); HibernateSession.beginTransaction(); //session.flush(); session.saveOrUpdate(forum); HibernateSession.endTransaction(true); } catch (HibernateException e) { try { HibernateSession.closeSession(); } catch (HibernateException e1) { throw new DataAccessException(e1.getMessage(), e1.getCause()); } throw new DataAccessException(e.getMessage(), e.getCause()); } }
And now the code of my test class : Code: HibernateSession.setHibernateConfigFile("/hibernateTest.cfg.xml");
//get my DAO and retrieve conflict ConflictHibernateDAO conflictDao = (ConflictHibernateDAO) DAOFactory.createFactory().getDao(Constants.CONFLICT_DAO); Conflict conflict = new Conflict(); conflict.setId(new Integer(43)); conflict = conflictDao.getConflict(conflict);
HibernateSession.closeSession(); //Close the session
//Retrieve the forum forumDao = (ForumHibernateDAO) DAOFactory.createFactory().getDao(Constants.FORUM_DAO); forum = forumDao.findForum(conflict, Tokens.CLAIMANT); System.out.println("Forum number "+forum.getId());
HibernateSession.closeSession(); //Close the session
Forummessage message; message = new Forummessage(); message.setAttach("att"); message.setMessage("message1"); message.setSubject("subject1"); message.setDateMessage(new Date()); message.setForummessages(new TreeSet()); forum.getForummessages().add(message); forumDao.saveOrUpdateForum(forum); HibernateSession.closeSession(); //Close the session
Forummessage message2 = new Forummessage(); message2.setAttach("att"); message2.setMessage("message2"); message2.setSubject("subject2"); message2.setDateMessage(new Date()); forum.getForummessages().add(message2); forumDao.saveOrUpdateForum(forum);
HibernateSession.closeSession(); //Close the session
It does not work. Indeed, the first message is properly saved with the good reference to the Forum. But when it saves the second message, this one is properly saved (with good reference to the forum) but the first message is updated and the reference to the forum is setted to null. To summarize, In my database I have the Forum with id 4. The first message is saved : attach : att message : message1 blblbla ref_forum : 4 After when it save the second message I have : First message : attach : att message : message1 blblbla ref_forum : NULL Why ?The secondmessage is saved : attach : att message : message2 blblbla ref_forum : 4 See bellow the hibernate log : 11:39:30,312 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,312 DEBUG SessionImpl:1285 - saveOrUpdate() previously saved instance with id: 4 11:39:30,312 DEBUG SessionImpl:1338 - updating [com.newcompany.business.Forum#4] 11:39:30,312 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forum 11:39:30,312 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forum.forummessages 11:39:30,312 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,312 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,312 DEBUG SessionImpl:1285 - saveOrUpdate() previously saved instance with id: 127 11:39:30,312 DEBUG SessionImpl:1338 - updating [com.newcompany.business.Forummessage#127] 11:39:30,312 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,312 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,312 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,328 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,328 DEBUG SessionImpl:1285 - saveOrUpdate() previously saved instance with id: 128 11:39:30,328 DEBUG SessionImpl:1338 - updating [com.newcompany.business.Forummessage#128] 11:39:30,328 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,328 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,328 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,328 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,328 DEBUG SessionImpl:1280 - saveOrUpdate() unsaved instance 11:39:30,328 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,328 DEBUG BatcherImpl:226 - prepared statement get: select nextval ('seq_forummessage') 11:39:30,328 DEBUG BatcherImpl:232 - preparing statement 11:39:30,328 DEBUG SequenceGenerator:72 - Sequence identifier generated: 129 11:39:30,328 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,328 DEBUG BatcherImpl:245 - closing statement 11:39:30,328 DEBUG SessionImpl:734 - saving [com.newcompany.business.Forummessage#129] 11:39:30,328 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,328 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,328 DEBUG SessionImpl:2775 - Wrapped collection in role: com.newcompany.business.Forummessage.forummessages 11:39:30,343 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,343 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forummessage.forummessages 11:39:30,343 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,343 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forum 11:39:30,343 DEBUG JDBCTransaction:54 - commit 11:39:30,343 DEBUG SessionImpl:2219 - flushing session 11:39:30,343 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forum 11:39:30,343 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forum.forummessages 11:39:30,343 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,343 DEBUG SessionImpl:1266 - saveOrUpdate() persistent instance 11:39:30,343 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,343 DEBUG SessionImpl:1266 - saveOrUpdate() persistent instance 11:39:30,359 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,359 DEBUG SessionImpl:1266 - saveOrUpdate() persistent instance 11:39:30,359 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forum 11:39:30,359 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,359 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,359 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,359 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,359 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,359 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forummessage.forummessages 11:39:30,359 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,359 DEBUG SessionImpl:299 - Collection dirty: [com.newcompany.business.Forum.forummessages#4] 11:39:30,359 DEBUG SessionImpl:2328 - Flushing entities and processing referenced collections 11:39:30,359 DEBUG SessionImpl:2424 - Updating entity: [com.newcompany.business.Forum#4] 11:39:30,359 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forum.forummessages#4], was: [com.newcompany.business.Forum.forummessages#4] 11:39:30,359 DEBUG SessionImpl:2424 - Updating entity: [com.newcompany.business.Forummessage#127] 11:39:30,375 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forummessage.forummessages#127], was: [com.newcompany.business.Forummessage.forummessages#127] 11:39:30,375 DEBUG SessionImpl:2424 - Updating entity: [com.newcompany.business.Forummessage#128] 11:39:30,375 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forummessage.forummessages#128], was: [com.newcompany.business.Forummessage.forummessages#128] My note : save the first message 11:39:30,375 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forummessage.forummessages#129], was: [<unreferenced>] 11:39:30,375 DEBUG SessionImpl:2647 - Processing unreferenced collections 11:39:30,375 DEBUG SessionImpl:2658 - Scheduling collection removes/(re)creates/updates 11:39:30,390 DEBUG SessionImpl:2231 - Flushed: 1 insertions, 3 updates, 0 deletions to 4 objects 11:39:30,390 DEBUG SessionImpl:2236 - Flushed: 1 (re)creations, 1 updates, 0 removals to 4 collections 11:39:30,390 DEBUG SessionImpl:2266 - executing flush 11:39:30,390 DEBUG EntityPersister:503 - Inserting entity: [com.newcompany.business.Forummessage#129] 11:39:30,390 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,390 DEBUG BatcherImpl:226 - prepared statement get: insert into forummessage (message, subject, date_message, notifiy, attach, ref_author, id) values (?, ?, ?, ?, ?, ?, ?) 11:39:30,390 DEBUG BatcherImpl:232 - preparing statement 11:39:30,390 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forummessage#129] 11:39:30,390 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,390 DEBUG BatcherImpl:245 - closing statement 11:39:30,390 DEBUG EntityPersister:676 - Updating entity: [com.newcompany.business.Forum#4] 11:39:30,390 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,390 DEBUG BatcherImpl:226 - prepared statement get: update forum set name=?, ref_conflict=? where id=? 11:39:30,390 DEBUG BatcherImpl:232 - preparing statement 11:39:30,390 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forum#4] 11:39:30,406 DEBUG Cascades:245 - unsaved-value: 0 11:39:30,406 DEBUG EntityPersister:676 - Updating entity: [com.newcompany.business.Forummessage#127] 11:39:30,406 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,406 DEBUG BatcherImpl:245 - closing statement 11:39:30,406 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,406 DEBUG BatcherImpl:226 - prepared statement get: update forummessage set message=?, subject=?, date_message=?, notifiy=?, attach=?, ref_author=? where id=? 11:39:30,406 DEBUG BatcherImpl:232 - preparing statement 11:39:30,406 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forummessage#127] 11:39:30,406 DEBUG EntityPersister:676 - Updating entity: [com.newcompany.business.Forummessage#128] 11:39:30,406 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forummessage#128] 11:39:30,406 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,406 DEBUG BatcherImpl:245 - closing statement 11:39:30,406 DEBUG BasicCollectionPersister:587 - Deleting rows of collection: [com.newcompany.business.Forum.forummessages#4] 11:39:30,421 DEBUG BasicCollectionPersister:611 - no rows to delete 11:39:30,421 DEBUG BasicCollectionPersister:756 - Updating rows of collection: com.newcompany.business.Forum.forummessages#4 11:39:30,421 DEBUG BasicCollectionPersister:761 - done updating rows 11:39:30,421 DEBUG BasicCollectionPersister:625 - Inserting rows of collection: [com.newcompany.business.Forum.forummessages#4] 11:39:30,421 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,421 DEBUG BatcherImpl:226 - prepared statement get: update forummessage set ref_forum=? where id=? 11:39:30,421 DEBUG BatcherImpl:232 - preparing statement 11:39:30,421 DEBUG BasicCollectionPersister:654 - done inserting rows 11:39:30,421 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,421 DEBUG BatcherImpl:245 - closing statement 11:39:30,421 DEBUG BasicCollectionPersister:544 - Inserting collection: [com.newcompany.business.Forummessage.forummessages#129] 11:39:30,421 DEBUG BasicCollectionPersister:573 - collection was empty 11:39:30,421 DEBUG SessionImpl:2678 - post flush 11:39:30,421 DEBUG SessionImpl:507 - transaction completion 11:39:30,421 DEBUG SessionImpl:3250 - disconnecting session 11:39:30,421 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1 11:39:30,421 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1 11:39:30,421 DEBUG SessionImpl:507 - transaction completion 11:39:30,437 DEBUG SessionImpl:495 - closing session 11:39:30,437 DEBUG SessionImpl:477 - opened session 11:39:30,437 DEBUG JDBCTransaction:36 - begin 11:39:30,437 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0 11:39:30,437 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0 11:39:30,437 DEBUG DriverManagerConnectionProvider:84 - using pooled JDBC connection, pool size: 0 11:39:30,437 DEBUG DriverManagerConnectionProvider:84 - using pooled JDBC connection, pool size: 0 11:39:30,437 DEBUG SessionImpl:2219 - flushing session 11:39:30,437 DEBUG SessionImpl:2328 - Flushing entities and processing referenced collections 11:39:30,437 DEBUG SessionImpl:2647 - Processing unreferenced collections 11:39:30,437 DEBUG SessionImpl:2658 - Scheduling collection removes/(re)creates/updates 11:39:30,437 DEBUG SessionImpl:2231 - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects 11:39:30,453 DEBUG SessionImpl:2236 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections 11:39:30,453 DEBUG SessionImpl:2266 - executing flush 11:39:30,453 DEBUG SessionImpl:2678 - post flush 11:39:30,453 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,453 DEBUG SessionImpl:1285 - saveOrUpdate() previously saved instance with id: 4 11:39:30,453 DEBUG SessionImpl:1338 - updating [com.newcompany.business.Forum#4] 11:39:30,453 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forum 11:39:30,453 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forum.forummessages 11:39:30,453 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,453 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,453 DEBUG SessionImpl:1285 - saveOrUpdate() previously saved instance with id: 127 11:39:30,453 DEBUG SessionImpl:1338 - updating [com.newcompany.business.Forummessage#127] 11:39:30,453 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,453 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,453 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,453 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,453 DEBUG SessionImpl:1285 - saveOrUpdate() previously saved instance with id: 128 11:39:30,453 DEBUG SessionImpl:1338 - updating [com.newcompany.business.Forummessage#128] 11:39:30,453 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,453 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,453 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,453 DEBUG Cascades:274 - unsaved-value strategy NULL 11:39:30,453 DEBUG SessionImpl:1285 - saveOrUpdate() previously saved instance with id: 129 11:39:30,453 DEBUG SessionImpl:1338 - updating [com.newcompany.business.Forummessage#129] 11:39:30,468 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,468 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forummessage.forummessages 11:39:30,468 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,468 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,468 DEBUG Cascades:274 - unsaved-value strategy NULL My note : save the second message 11:39:30,468 DEBUG SessionImpl:1280 - saveOrUpdate() unsaved instance 11:39:30,468 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,468 DEBUG BatcherImpl:226 - prepared statement get: select nextval ('seq_forummessage') 11:39:30,468 DEBUG SessionImpl:3302 - running Session.finalize() 11:39:30,468 DEBUG BatcherImpl:232 - preparing statement 11:39:30,468 DEBUG SequenceGenerator:72 - Sequence identifier generated: 130 11:39:30,468 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,468 DEBUG BatcherImpl:245 - closing statement 11:39:30,468 DEBUG SessionImpl:734 - saving [com.newcompany.business.Forummessage#130] 11:39:30,468 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,468 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,468 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,468 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,468 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forum 11:39:30,468 DEBUG JDBCTransaction:54 - commit 11:39:30,468 DEBUG SessionImpl:2219 - flushing session 11:39:30,468 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forum 11:39:30,484 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forum.forummessages 11:39:30,484 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,484 DEBUG SessionImpl:1266 - saveOrUpdate() persistent instance 11:39:30,484 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,484 DEBUG SessionImpl:1266 - saveOrUpdate() persistent instance 11:39:30,484 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,484 DEBUG SessionImpl:1266 - saveOrUpdate() persistent instance 11:39:30,484 DEBUG Cascades:105 - cascading to saveOrUpdate() 11:39:30,484 DEBUG SessionImpl:1266 - saveOrUpdate() persistent instance 11:39:30,484 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forum 11:39:30,484 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG Cascades:381 - cascading to collection: com.newcompany.business.Forummessage.forummessages 11:39:30,484 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG Cascades:356 - processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG Cascades:364 - done processing cascades for: com.newcompany.business.Forummessage 11:39:30,484 DEBUG SessionImpl:299 - Collection dirty: [com.newcompany.business.Forum.forummessages#4] 11:39:30,484 DEBUG SessionImpl:2328 - Flushing entities and processing referenced collections 11:39:30,484 DEBUG SessionImpl:2424 - Updating entity: [com.newcompany.business.Forum#4] 11:39:30,484 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forum.forummessages#4], was: [com.newcompany.business.Forum.forummessages#4] 11:39:30,531 DEBUG SessionImpl:2424 - Updating entity: [com.newcompany.business.Forummessage#127] 11:39:30,531 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forummessage.forummessages#127], was: [com.newcompany.business.Forummessage.forummessages#127] 11:39:30,531 DEBUG SessionImpl:2424 - Updating entity: [com.newcompany.business.Forummessage#128] 11:39:30,531 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forummessage.forummessages#128], was: [com.newcompany.business.Forummessage.forummessages#128] 11:39:30,531 DEBUG SessionImpl:2424 - Updating entity: [com.newcompany.business.Forummessage#129] 11:39:30,531 DEBUG SessionImpl:2805 - Collection found: [com.newcompany.business.Forummessage.forummessages#129], was: [com.newcompany.business.Forummessage.forummessages#129] 11:39:30,531 DEBUG SessionImpl:2647 - Processing unreferenced collections 11:39:30,531 DEBUG SessionImpl:2658 - Scheduling collection removes/(re)creates/updates 11:39:30,531 DEBUG SessionImpl:2231 - Flushed: 1 insertions, 4 updates, 0 deletions to 5 objects 11:39:30,531 DEBUG SessionImpl:2236 - Flushed: 0 (re)creations, 1 updates, 0 removals to 4 collections 11:39:30,531 DEBUG SessionImpl:2266 - executing flush 11:39:30,531 DEBUG EntityPersister:503 - Inserting entity: [com.newcompany.business.Forummessage#130] 11:39:30,531 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,531 DEBUG BatcherImpl:226 - prepared statement get: insert into forummessage (message, subject, date_message, notifiy, attach, ref_author, id) values (?, ?, ?, ?, ?, ?, ?) 11:39:30,531 DEBUG BatcherImpl:232 - preparing statement 11:39:30,531 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forummessage#130] 11:39:30,546 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,546 DEBUG BatcherImpl:245 - closing statement 11:39:30,546 DEBUG EntityPersister:676 - Updating entity: [com.newcompany.business.Forum#4] 11:39:30,546 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,546 DEBUG BatcherImpl:226 - prepared statement get: update forum set name=?, ref_conflict=? where id=? 11:39:30,546 DEBUG BatcherImpl:232 - preparing statement 11:39:30,546 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forum#4] 11:39:30,546 DEBUG Cascades:245 - unsaved-value: 0 11:39:30,546 DEBUG EntityPersister:676 - Updating entity: [com.newcompany.business.Forummessage#127] 11:39:30,546 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,546 DEBUG BatcherImpl:245 - closing statement 11:39:30,546 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,546 DEBUG BatcherImpl:226 - prepared statement get: update forummessage set message=?, subject=?, date_message=?, notifiy=?, attach=?, ref_author=? where id=? 11:39:30,546 DEBUG BatcherImpl:232 - preparing statement 11:39:30,546 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forummessage#127] 11:39:30,562 DEBUG EntityPersister:676 - Updating entity: [com.newcompany.business.Forummessage#128] 11:39:30,562 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forummessage#128] 11:39:30,562 DEBUG EntityPersister:676 - Updating entity: [com.newcompany.business.Forummessage#129] 11:39:30,562 DEBUG EntityPersister:393 - Dehydrating entity: [com.newcompany.business.Forummessage#129] 11:39:30,562 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,562 DEBUG BatcherImpl:245 - closing statement 11:39:30,562 DEBUG BasicCollectionPersister:587 - Deleting rows of collection: [com.newcompany.business.Forum.forummessages#4] 11:39:30,562 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,562 DEBUG BatcherImpl:226 - prepared statement get: update forummessage set ref_forum=null where ref_forum=? and id=? 11:39:30,578 DEBUG BatcherImpl:232 - preparing statement 11:39:30,578 DEBUG BasicCollectionPersister:608 - done deleting collection rows 11:39:30,578 DEBUG BasicCollectionPersister:756 - Updating rows of collection: com.newcompany.business.Forum.forummessages#4 11:39:30,578 DEBUG BasicCollectionPersister:761 - done updating rows 11:39:30,578 DEBUG BasicCollectionPersister:625 - Inserting rows of collection: [com.newcompany.business.Forum.forummessages#4] 11:39:30,578 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,578 DEBUG BatcherImpl:245 - closing statement 11:39:30,578 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets 11:39:30,578 DEBUG BatcherImpl:226 - prepared statement get: update forummessage set ref_forum=? where id=? 11:39:30,578 DEBUG BatcherImpl:232 - preparing statement 11:39:30,578 DEBUG BasicCollectionPersister:654 - done inserting rows 11:39:30,578 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets 11:39:30,578 DEBUG BatcherImpl:245 - closing statement 11:39:30,578 DEBUG SessionImpl:2678 - post flush 11:39:30,593 DEBUG SessionImpl:507 - transaction completion 11:39:30,593 DEBUG SessionImpl:3250 - disconnecting session 11:39:30,593 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1 11:39:30,593 DEBUG DriverManagerConnectionProvider:121 - returning connection to pool, pool size: 1 11:39:30,593 DEBUG SessionImpl:507 - transaction completion 11:39:30,593 DEBUG SessionImpl:495 - closing session
Is this a bug, or anything I don't understand in documentation ? Thank you J
|
|