It did change to null if I make a change on the object (next save)
Can I force NHibernate to add -1 instead of null (Backward
compatibility with existing data)

On 31 Aug., 16:51, chitech <[email protected]> wrote:
> Hi
>
> I have a foreignkey column where some of the rows have value -1
> (legacy data)
>
> If I have his mapping
> [BelongsTo("ParentID")]
>
> I get a error but if I changed to this:
>
> [BelongsTo("ParentID", NotFoundBehaviour = NotFoundBehaviour.Ignore)]
>
> It's working
>
> In the 
> documentationhttp://api.castleproject.org/html/T_Castle_ActiveRecord_NotFoundBehav...
> it say:
> Ignore = the broken relation and update the FK to null on the next
> save.
>
> I try to make a save to see if it change to null but it does not
> changes. I don't want it to change but the documentation says
> something else. We just want to be sure to do it right.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to