-->
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: Newbie: Trouble Updating Data within two Sessions
PostPosted: Mon Oct 17, 2005 10:48 am 
Hi, I'm new to nhibernate, and everything is was working fine until now.

I have a problem and I can't find an answer to it on the docs nor the forum, so I would appreciate if somebody could help me.

The thing is, I'm trying to develop a small app to control a warehouse with C# - Nhibernate - MySQL.

I have a class called StockMovement.

When I save a new StockMovement with session.Save (also using ITransaction) the INSERT query is executed in Mysql and the record is saved in the correct table, but, when I open another separate session and try to calculate stock by adding/substracting the StockMovements recorded on the database using

Code:
session.Find("FROM StockMovement")


I don't get the records saved with the other session until the reference to the other session is disposed.

I tried flushing the first session with session.Flush(); and changing the flushmode to Commit(), but nothing happened.

I'm sure there is something I didn't understand about how the O/R mapper works, but I can't figure it out.


Top
  
 
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.