I hav a table with following fields
public class ActivationCode
{
public virtual int LoginAccountId { get; set; }
public virtual string ActivatedCode { get; set; }
public virtual DateTime ActivationDate { get; set; }
}
where LoginAccountid is my primary key and mapped as
<id name="LoginAccountId">
<generator class="native" />
</id>
While saving i am assigning LoginAccountId as my users account id
bt while saving it is taking its own id and saving the data
i tried to save the data with both
Session.Save(); and Session.SaveorUpdate
bt in Session.SaveorUpdate its giving me error as
Unexpected row count: 0; expected: 1.
Can any one help me with this?
From nhibernate.info: