The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: Daryl Stultz <kungfumachin...@gmail.com>
Date: Sat, 6 Mar 2010 06:16:20 -0800 (PST)
Local: Sat, Mar 6 2010 9:16 am
Subject: Re: Eager vs Lazy produces different results
On Mar 5, 5:00 pm, Rob Bygrave <robin.bygr...@gmail.com> wrote: > I'd suggest that is a bug because you put the distinct in your query. Note Yes, OpenJPA just slaps the DISTINCT on to the beginning of the query. > there is a difference here with Ebean. With Ebean you don't need to specify > the distinct as the persistence context is used during the building of the > object graph ... and that by definition we can't have 2 (of the same) users. > To me this is like JPA implementations are not using the persistence context > during it's object graph construction which I find very strange I haven't analyzed the query to determine why this doesn't work. The results contain 2 copies of the user, but I'm sure the 2 are the > So now I'm thinking we can go two ways... I've really had a hard time trying to decide what side of this I want > Option 1. stick with the current interpretation ... and force people to > use subqueries and the like > Option 2. change to use the same interpretation as JPQL ... and provide > some mechanism so that people that want to filter the many can do so. to be on. I've decided I do not want the child list filtered. In SQL you have complete control over all the result rows. You get to put things together however you want. With Ebean ORM queries you are asking for a collection of an entity. You are not responsible for the "intermediate" child rows. You don't "see" them or "process" them. So the "sense" is that you are only working with the root entity rows. Therefore the criteria should refer to these rows only. We talked about the case of Customers and Orders. I suggested query = Ebean.find(Order.class)... /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.
| ||||||||||||||