-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Updates order
PostPosted: Fri Oct 09, 2009 12:25 pm 
Newbie

Joined: Fri Oct 09, 2009 12:10 pm
Posts: 2
Hello,
I have a question about order of hibernate updates. My simple example looks like:
Code:
Session session;
Transaction tx = session.beginTransaction();
Invoice invoice = session.load(Invoice.class, 1);
Employee employee = session.load(Employee .class, 1);

invoice.setValue(12);
employee.setName("New name");

session.update(employee);
session.update(invoice);

tx.commit();


but in console I see that hibernate first make a update invoice object and after that employee. Whay hibernate don't update in my order (employee->invoice) ?

Best regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.