Hi Omer,

Lazy loading of collections works with NH 2.1, and thus with ActiveRecord.

To learn how lazy collection works check this:
http://nhforge.org/wikis/howtonh/lazy-loading-eager-loading.aspx

-- Roelof.

On Mon, Aug 9, 2010 at 9:48 AM, omer katz <[email protected]> wrote:

> So
> [
> HasMany(Lazy = true)]
>
> public
> virtual ISet<foo> foos;
>
>
>
> doesn't work as well?
>
> How come it compiles?
>
> If it does work, how does it load the set lazily?
>
> 2010/8/8 Markus Zywitza <[email protected]>
>
>> Not at all.
>>
>> This doesn't work with NH2.1, only with NH3.0 Alpha. AR uses NH2.1.
>>
>> -Markus
>>
>> 2010/8/8 omer katz <[email protected]>:
>>  > In active record to write a model you write:
>> >
>> > [ActiveRecord("TableName")]
>> > public class Model
>> > {
>> >    [Property("SomeField")]
>> >    public virtual string SomeField { get; set; };
>> >
>> >    [Property("SomeLazyField"), Lazy= true]
>> >    public virtual string SomeLazyField { get; set; };
>> >
>> > }
>> >
>> >
>> > If the field is lazy it must fetch it on the first access, so how does
>> the
>> > Property attribute override the property and fetches the SomeLazyField
>> > value?
>> >
>> > Thanks,
>> > Omer
>> >
>> > --
>> > 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]<castle-project-users%[email protected]>
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/castle-project-users?hl=en.
>> >
>>
>> --
>> 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]<castle-project-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/castle-project-users?hl=en.
>>
>>  --
> 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]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>

-- 
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