Thread:
 Not saving object to database 
 baaziabu   19 Jul 2007, 08:09 
 Re: Not saving object to database 
 lmc   16 Jan 2008, 16:17 
 Re: Not saving object to database 
 Nandem   22 Jan 2008, 17:15 
 Re: Not saving object to database 
 dragos_aluculesa   15 Feb 2008, 17:46 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: Nandem (22 Jan 2008, 17:15) Replies: 1, Views: 1326
Subject: Re: Not saving object to database
what exactly are you guys saving ?
just one object ?

well...

there a many reasons to nHibernate not saving new instances. 

maybe are in 
try { } catch(Exception) { } 
and you cant see the error throws,

maybe (if u're using <many-to-one unique="true"> tag on hibernate, and
this object will be saved if u use property (cascade="save-update").

if in session.FlushMode is setted to FlushMode.Never
call a session.flush() before call commitTransaction (maybe it works!)


try change session.FlushMode options.


are to many reasons for it not work.
Post the code, and maybe some guy will help ya


good luck!
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]