-->
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.  [ 2 posts ] 
Author Message
 Post subject: NHibernate Insert is Committing but object is not persisted
PostPosted: Mon Jan 19, 2009 12:24 am 
Newbie

Joined: Thu Jul 17, 2008 12:00 am
Posts: 5
0 vote down
star


When debugging everything appears good. The insert commits and there is no roll back, no exceptions. I have tried leaving out the flush() as well. This is SQLCE. I sure hope some can help with this.

Here is my call:

using (ITransaction transaction = _session.BeginTransaction())
{

_session.Save(calc);
_session.flush();
transaction.Commit();
}

Real simple mapping:

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="SigCalculator"
namespace="SigCalculator.Domain">

<id name="ID">
<generator class="guid" />
</id>
<property name="Time" />
<property name="Equation" />

here's the object:

public class Calculation
{
public virtual Guid ID { get; set; }
public virtual DateTime Time { get; set; }
public virtual string Equation { get; set; }

}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2009 1:26 am 
Newbie

Joined: Thu Jul 17, 2008 12:00 am
Posts: 5
Im dumb.. forgot to set my pk at the DB... DUH


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.