From: Rob Bygrave <robin.bygr...@gmail.com>
Date: Fri, 5 Mar 2010 19:57:10 +1300
Local: Fri, Mar 5 2010 1:57 am
Subject: Re: [ebean] Re: Eager vs Lazy produces different results
> " join o.validRoles as vr" If you get a chance ... can you change this join to a "fetch join"... I'd suggest the second query is a perhaps a lazy loading query. It is hard Assuming no columns from t2 are in the select clause of the first query it > I'm thinking that people (like me) coming from JPA are going to be confused Yes. I also think JPQL didn't help with it's need for distinct. You will To me this is actually coming down to the difference between *ToMany and I think we want to do both ... and we want to make this as easy for people On Fri, Mar 5, 2010 at 3:24 PM, Daryl Stultz <kungfumachin...@gmail.com>wrote: > On Mar 4, 8:07 pm, Rob Bygrave <robin.bygr...@gmail.com> wrote: > > I'd suggest what you wanted to do was more like: > > Personally I have a SQL bias and I'd suggest the reason you where > I've been mulling the whole thing over since my last post and came to > I'm thinking that people (like me) coming from JPA are going to be > > That is, when you do the JPA query and see the generated SQL I'd > Yes that's what I expected to see, and I'm sure I've seen it in some > User user = setup.insertUser("user1"); > List<Integer> roleIds = new ArrayList<Integer>(); > Query query = ExecutionResources.getEntityManager().createQuery( > List<User> result = query.getResultList(); > JpaUtils.addFetchFields takes advantage of fetch plan manipulation to > SELECT DISTINCT t0.userid, ... > SELECT DISTINCT t0.userid... > It looks a bit whacky to me, double joining the child tables. Not sure > > and the question > Yup, I hear ya. Looks like that's where I'm going... > > Yup - that is going to be a bug - but firstly I want to get to the > Just so we're clear, the default join/fetch produces a filtered child > /Daryl You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||