I never said "Projection"BTW... if you don't want relations you don't have relations and NH don't know nothing about relations; if you don't have relations you can't query using relations. You said : "We don't wan't any automatic loading either. We simply want a poco object without references."
If you don't have reference how you think that NH allow you query by related object properties ? where, NH, can know relationships ? IT is math applied to information, there is no magic : 0-1, true-false, has-don't have, win-lose, relationships-no relationships 2009/3/17 Chucara <[email protected]> > > We considered adding the relations as simple properties, but that > would mean we wouldn't be able to use HQL to query the entities we > retrieve - a feature we'd really like. > > Now, I agree that nHibernate might be optimal in our situation, but > I'm not really sure what is, short of generating the code ourselves. > > I'm not sure what you mean by projections, other than "select xx.YY > from ZZ xx". Are you talking about the IProjection interface? > > Also, is there some documentation I'm missing other than the > reference? I can find the IProjection interface in the reference > documentation, but not really an explanation of what it does. > > On 17 Mar., 18:22, Fabio Maulo <[email protected]> wrote: > > given this: > > <class name="Animal"> > > <id name="id"> > > <generator class="native"/> > > </id> > > <property name="description" /> > > <property name="bodyWeight" column="body_weight"/> > > <many-to-one name="mother" column="mother_id"/> > > <many-to-one name="father" column="father_id"/> > > </class> > > > > Your are looking for this: > > <class name="Animal"> > > <id name="id"> > > <generator class="native"/> > > </id> > > <property name="description" /> > > <property name="bodyWeight" column="body_weight"/> > > <property name="motherId" column="mother_id"/> > > <property name="fatherId" column="father_id"/> > > </class> > > > > 2009/3/17 Chucara <[email protected]> > > > > > > > > > > > > > I tried: > > > > > session.CreateQuery("select job from Job job"); > > > > > But it appears that it will either load every related entity, or use > > > proxy objects, depending on whether or not I set lazy="false" in my > > > hbm.xml. > > > > > Is there no way to avoid both lazy and eager loading? I basically want > > > no loading. ;) > > > > > On 17 Mar., 16:46, Ben Lovell <[email protected]> wrote: > > > > Look into projections for returning exactly what you want. > > > > > > Sent from my iPhone > > > > > > On 17 Mar 2009, at 15:34, Chucara <[email protected]> wrote: > > > > > > > We're trying to use nHibernate on our middle tier to loading > objects > > > > > for the client, but we seem to keep hitting a wall of poor > > > > > performance. > > > > > > > - Is it possible to load flat lists of objects? I.e. don't load any > > > > > collections or relationships to other tables. We don't wan't any > > > > > automatic loading either. We simply want a poco object without > > > > > references. > > > > > > > - Is there a best practice for using nHibernate disconnected? It > seems > > > > > that nHibernate is very good if you can actually use the lazy > loading > > > > > and caching it offers, but that the same features become a nuisance > > > > > when you can't. > > > > > > > We can't help but feel that we don't really have full control of > how > > > > > objects are loaded. No matter what we do, we can't get it to NOT > load > > > > > references other than by creating proxy objects, which are > > > > > unserializeable outside the session. > > > > > > > We might be doing something completely wrong, but we can't really > find > > > > > any documentation/examples of how to do it. Does anyone know of > anyone > > > > > using nHibernate with a middletier/client setup? > > > > -- > > Fabio Maulo > > > -- 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] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
