It's similar to my question:
http://groups.google.com/group/castle-project-users/browse_thread/thread/152285b00b3c12cb/29f50ec93e67e1af

Even though, I did not get a chance to try again with Markus Zywitza
solution. This weekend I will.

Where I left off resolving, I tried setting default-lazy="true" in my
App.config (modal nunit test) and it did not pull anything off the
database (e.g. SELECT).

Sincerely,
William Chang


On Aug 14, 1:05 pm, JimmyJamz <[email protected]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to