Hi,

We also have this requirement, any development on that subject?
Does "session.QueryOver" do real Enumeration?

Thanks,
Tomer


On Monday, December 14, 2009 1:17:21 AM UTC+2, Fabio Maulo wrote:
>
> Ah ok... The IEnumerable is only a mirage
>
> 2009/12/13 ajaishankar <[email protected] <javascript:>>
>
>> Tried it - surprisingly lazy loading worked without problems!
>>
>> Like you said it is a mirage :-)
>>
>> Think the SqlDataReader is wrapped in a Driver.NDataReader which loads
>> everything into an internal list!
>>
>> So ultimately even calling Enumerable loads everything in memory - no
>> way to stream results currently in NH :-(
>>
>> Thanks
>>
>> Ajai
>>
>> On Dec 13, 10:25 am, Fabio Maulo <[email protected]> wrote:
>> > Yes it is but not for that line...
>> > we are truly wrapping the datareader inside the QueryLoader, btw I never
>> > have tested it to check the behaviour initializing some lazyloading
>> > relationship.
>> > If you have time please try it.
>> > Thanks.
>> >
>> > 2009/12/13 ajaishankar <[email protected]>
>> >
>> >
>> >
>> > > Pulling this in reflector:
>> >
>> > > SessionImpl.Enumeration()
>> > >   HQLQueryPlan.DoIterate
>> > >       NHibernate.Hql.Classic.QueryTranslator.GetEnumerable()
>> >
>> > > What is currently returned is a true enumerable :-)
>> >
>> > > If I wanted to request this feature (enumeration for criteria & sql
>> > > query) which group would I need to post to?
>> >
>> > > The scenario I have where this would be super useful is:
>> >
>> > >http://groups.google.com/group/nhusers/browse_thread/thread/8ba75a088.
>> ..
>> >
>> > > Ajai
>> >
>> > > On Dec 13, 9:12 am, Fabio Maulo <[email protected]> wrote:
>> > > > If I well remember that impl. is only a mirage ;) (not a real 
>> enumerable
>> > > > where each row is converted only during enumeration).
>> >
>> > > > 2009/12/13 ajaishankar <[email protected]>
>> >
>> > > > > Thanks!
>> >
>> > > > > I think Enumeration is currently enabled for HQL queries; looking 
>> at
>> > > > > QueryTranslator & NHibernate.Impl.EnumerableImpl
>> >
>> > > > > Wouldn't the lazy-load Fabio explained affect that too?
>> >
>> > > > > Not trying to argue here - just getting an understanding...
>> >
>> > > > > Couldn't the burden of eager fetching be offloaded to the user 
>> since
>> > > > > enumerating might be a "specialized" usage?
>> >
>> > > > > Ajai
>> >
>> > > > > On Dec 13, 8:23 am, Jason Meckley <[email protected]> wrote:
>> > > > > > var objects = session.CreateCriteria().Add().List();
>> > > > > > foreach(var obj in objects)
>> > > > > > {
>> >
>> > > > > > }
>> >
>> > > > > > On Dec 12, 5:01 pm, ajaishankar <[email protected]> wrote:
>> >
>> > > > > > > I understand - but is there a particular reason for not 
>> enabling
>> > > > > > > enumerable over criteria or sql queries?
>> >
>> > > > > > > I feel the querying + data to object mapping capabilities 
>> combined
>> > > > > > > with streaming result behavior will be quite useful.
>> >
>> > > > > > > Unless I'm missing something, not being able to enumerate 
>> over the
>> > > > > > > results of a criteria seems to be an artificial restriction.
>> >
>> > > > > > > Ajai
>> >
>> > > > > > > On Dec 12, 2:12 pm, Jason Meckley <[email protected]> 
>> wrote:
>> >
>> > > > > > > > If you want ETL without SSIS look into Rhino.ETL (
>> > >http://github.com/
>> > > > > > > > ayende/rhino-etl). NH is meant to be an ETL framework it's 
>> an
>> > > ORM.
>> >
>> > > > > > > > On Dec 12, 11:57 am, ajaishankar <[email protected]> 
>> wrote:
>> >
>> > > > > > > > > Why isn't there a Enumerate for Criteria queries?
>> >
>> > > > > > > > > Also enumeration over a sql-query is currently not 
>> implemented!
>> >
>> > > > > > > > > I think it would be extremely useful to have these to 
>> enable
>> > > ETL
>> > > > > kind
>> > > > > > > > > of processing using NH for large data sets.
>> >
>> > > > > > > > > That way we could use NH to build queries using detached
>> > > criteria
>> > > > > and
>> > > > > > > > > do fancy SSIS kind of stuff like merge joins etc in 
>> code/Linq.
>> >
>> > > > > > > > > By enabling these we could have a good alternative to 
>> crappy
>> > > > > products
>> > > > > > > > > like SSIS...
>> >
>> > > > > > > > > Thanks
>> >
>> > > > > > > > > Ajai- Hide quoted text -
>> >
>> > > > > > > - Show quoted text -
>> >
>> > > > > --
>> >
>> > > > > You received this message because you are subscribed to the Google
>> > > Groups
>> > > > > "nhusers" group.
>> > > > > To post to this group, send email to 
>> > > > > [email protected]<javascript:>
>> .
>> > > > > To unsubscribe from this group, send email to
>> > > > > [email protected] <javascript:><
>> nhusers%[email protected] <javascript:>>
>> > > <nhusers%[email protected] <javascript:><
>> nhusers%[email protected] <javascript:>>
>> >
>> > > > > .
>> > > > > For more options, visit this group at
>> > > > >http://groups.google.com/group/nhusers?hl=en.
>> >
>> > > > --
>> > > > Fabio Maulo
>> >
>> > > --
>> >
>> > > You received this message because you are subscribed to the Google 
>> Groups
>> > > "nhusers" group.
>> > > To post to this group, send email to [email protected]<javascript:>
>> .
>> > > To unsubscribe from this group, send email to
>> > > [email protected] <javascript:><
>> nhusers%[email protected] <javascript:>>
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/nhusers?hl=en.
>> >
>> > --
>> > Fabio Maulo
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "nhusers" group.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/nhusers?hl=en.
>>
>>
>>
>
>
> -- 
> Fabio Maulo
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to