Joined: Fri Mar 13, 2009 10:36 am Posts: 10
|
Hi All,
I have a class A as follows
class A
{
long id;
string text;
B _bee;
//getter setter
public B Bee
{
get { return _bee; }
set {_bee= value;
_bee.aid = id;
}
}
} //END OF CLASS A
class B
{
long bid;
string text;
long aid;
//getter setter
}
The mapping for class A to B is as follows
<one-to-one name="Bee" class="B" cascade="save-update" fetch="select" property-ref="aid" />
Based of the code above what I am trying to do is set the value in class B for aid when Class A is saved.
However on saving class A I always get the value of aid as 0.
Is there anything I can do to get the correct value of aid?
|
|