I upgraded to the latest Active Record a couple days ago and am
testing out current software that's been developed based on the
initial beta release of Active Record. All is well after
changing .Expression to .Criterion but now it seems that when using
the ActiveRecordValidationBase class, when saving, it is pulling back
much more than what is needed.
After some research, it seems that the BelongsTo needs to be set to
lazy. So my belongsto on my child class is as follows -
Discovery class--
[BelongsTo("Research_Guid", Lazy = FetchWhen.OnInvoke, Update = false,
Insert = false)]
public Research Research{ get; set; }
On the parent Research table, the HasMany relationship is as follows-
[HasMany(typeof(Discovery), Cascade =
ManyRelationCascadeEnum.AllDeleteOrphan, Lazy = true, Inverse = true)]
public IList<Discovery> Discovery { get; set; }
Now when I pull back a Discovery object, the Research object comes
along with it even though I have the lazy set to oninvoke. So
whenever I make a change to the Discovery object and do a save, it
goes up to the parent Research class and then stems out to all other
relationships that stem off of the Research class where as it should
just validate the Discovery class and save.
I'm assuming I have the relationship lazy setting wrong somehow but I
can't seem to figure it out.
Any help is greatly appreciated.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---