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.  [ 3 posts ] 
Author Message
 Post subject: When flush, generate insert and update for the same object !
PostPosted: Thu Nov 27, 2008 6:55 am 
Newbie

Joined: Fri Nov 14, 2008 4:47 am
Posts: 5
Hi,

I use a very basic sample. Just one table with OR mapping.

Everything seems working fine for update : I do many modifications on the object, and then I flush the session to generate SQL instructions.

I create one object with C# code like : lObject = new TType()
I make modifications on the values and then I flsuh the session.

I don't understand why NHibernate generate two commands when the session flush.

The SQL Profiler shows two statements :
INSERT ... with empty values
UPDATE ... with the values I entered

Does somebody know why ?

Thanks a lot !

David.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 27, 2008 9:11 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Can you post your mappings and the relevant parts of the code ?

_________________
--Wolfgang


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 27, 2008 9:49 am 
Newbie

Joined: Fri Nov 14, 2008 4:47 am
Posts: 5
Hi Wolli,

I'll try to post these details this evening (I think we have the same time...).

In advance, thanks for your help

David


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

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.