Re: Unnecesery INNER JOIN

2010-07-23 Thread Daryl Stultz
On Fri, Jul 23, 2010 at 9:39 AM, RCollins wrote: > > I disagree with you when you say that if I want to fetch b.a.id it should > not > create any joins. It is the same type of thing as trying to fetch > b.a.description. I agree. > If you wanted to fetch just the id, then you do not try to >

Re: Unnecesery INNER JOIN

2010-07-23 Thread RCollins
I disagree with you when you say that if I want to fetch b.a.id it should not create any joins. It is the same type of thing as trying to fetch b.a.description. If you wanted to fetch just the id, then you do not try to access the joined table. You simple access the column on table B. b.a_id.

Re: Unnecesery INNER JOIN

2010-07-23 Thread QkI
RCollins wrote: > > Second. Answer this question for me. If table “A” has a field called > “description” would you expect a join with the following query: > > SELECT b.a.description FROM B where B.id = ‘123’ > In the case when I want to fetch only ID of relation, there shouldn't be any join

Re: Unnecesery INNER JOIN

2010-07-22 Thread Daryl Stultz
On Thu, Jul 22, 2010 at 9:51 AM, RCollins wrote: > > Test > > Uh... received? -- Daryl Stultz _ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com http://www.opentempo.com mailto:daryl.stu...@opentempo.com

Re: Unnecesery INNER JOIN

2010-07-22 Thread RCollins
Ok. Sorry for the delay in response. I have been having email problems. First things first, JPQL and SQL are not two totally different things. A developer needs to understand SQL before they begin trying JPQL. This is a MUST. The developer needs to understand what is going on under the hood

Re: Unnecesery INNER JOIN

2010-07-22 Thread RCollins
Test -- View this message in context: http://openjpa.208410.n2.nabble.com/Unnecesery-INNER-JOIN-tp5297321p5325421.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Unnecesery INNER JOIN

2010-07-20 Thread QkI
Is there any chance to improve this defect in 2.1.0 release? -- View this message in context: http://openjpa.208410.n2.nabble.com/Unnecesery-INNER-JOIN-tp5297321p5316339.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

RE: Unnecesery INNER JOIN

2010-07-16 Thread QkI
Russell Collins wrote: > > > You should have > > SELECT b.a_id FROM B where B.id = 123 > > >From what you said I think that you mix two different things: JPQL and SQL -- View this message in context: http://openjpa.208410.n2.nabble.com/Unnecesery-INNER-JOIN-tp5297321p5303473.html Sent fro

RE: Unnecesery INNER JOIN

2010-07-16 Thread Russell Collins
7; Subject: RE: Unnecesery INNER JOIN I guess what I am saying is that this join is necessary. In standard SQL the only way you are going to get relational data from two tables is by joining the tables or performing nested selects. I think the thing you want to do is to just look for the colum

RE: Unnecesery INNER JOIN

2010-07-16 Thread Russell Collins
mail.com] Sent: Friday, July 16, 2010 12:52 AM To: users@openjpa.apache.org Subject: RE: Unnecesery INNER JOIN >From my point of view, there shouldn't be any joins and correct SQL output should look like: SELECT b.a_id FROM table_b b WHERE b.id = 123 I try to limit unnecesery joins i

Re: Unnecesery INNER JOIN

2010-07-15 Thread Patrick Linskey
Hi, This sounds like it might be another manifestation of https://issues.apache.org/jira/browse/OPENJPA-1711 -Patrick On Jul 15, 2010, at 2:41 PM, Russell Collins wrote: > From the looks of what you have in your query, there has to be a join of some > kind. You are trying to get the "id" of

RE: Unnecesery INNER JOIN

2010-07-15 Thread QkI
>From my point of view, there shouldn't be any joins and correct SQL output should look like: SELECT b.a_id FROM table_b b WHERE b.id = 123 I try to limit unnecesery joins in my queries, because in the case of pessimistic locking this behavoiur locks too much. By the way previously I was using h

RE: Unnecesery INNER JOIN

2010-07-15 Thread Russell Collins
>From the looks of what you have in your query, there has to be a join of some >kind. You are trying to get the "id" of class "A" that is associated with >class "B". If this is not your desire, what are you trying to do? -Original Message- From: QkI [mailto:kukis...@gmail.com] Sent: Th