Thanks for the answer. I will make a request...
On Friday, 5 September 2014 13:57:23 UTC+2, Ricardo Peres wrote:
>
> There is no cascade option for that at the moment. You can ask for it at
> nhibernate.jira.com.
>
> RP
>
> On Friday, September 5, 2014 10:14:40 AM UTC+1, David Perfors wrote:
>>
>> Hi All,
>>
>> I am struggling with the following situation and although it is working
>> now, I wonder if there is a better way to do it.
>>
>> At the moment we have the following object and (fluent nhibernate)
>> mapping:
>>
>> public class A
>> {
>> public virtual int Id { get; set; }
>> public virtual string Code { get; set; }
>> public virtual A Reference { get; set; }
>> }
>> public class AMap : ClassMap<A>
>> {
>> public AMap()
>> {
>> Id(x => x.Id);
>> Map(x => x.Code);
>> References(x => x.Reference).Cascade.None();
>> }
>> }
>>
>>
>> A.Reference is allowed to be null, but when it is set, the following
>> should be true: a1.Reference == a2 && a2.Reference == a1.
>> At the moment we have to do this manually, and when deleting one of the
>> objects, we have to set the reference of the other object to null. Is there
>> a way to automate this?
>>
>> David.
>>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.