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 documentation
http://api.castleproject.org/html/T_Castle_ActiveRecord_NotFoundBehaviour.htm
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
-~----------~----~----~----~------~----~------~--~---