Tuesday, February 28, 2006

NHibernate debug

NHibernate “Can’t save to null “ adoexception
When you failed to maintain your relationship between entities correctly, and there is a cascade saveupdate, you will probably see this error.
<class husbande>
<one-to-one class=wife cascading=save-update>
….
Husband tom = new Husband();
Wife jane = new Wife();
tom.wife = jane;
sess.SaveOrUpdate(tom)

since you missed the  jane.husband = tom;
you will get that err.

1 comment:

  1. Anonymous11:50 PM

    Free Games Casino tyuueooru
    http://stonewalljacksoncarnival.org/ - Play Casino Games
    So you can have a wonderful gambling experience with the comfort at your home.
    [url=http://stonewalljacksoncarnival.org/]Online Casinos Free[/url]
    All you need to is a well operating computer and an Internet connection and you?re done with your gambling.
    No Deposit Casino
    All you need to is a well operating computer and an Internet connection and you?re done with your gambling.

    ReplyDelete