openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yann Andenmatten" <YAndenmat...@odyssey-group.com>
Subject RE: Get @Id field value (FK) without loading entity (JOIN) when using FetchGroups or Lazy Loading
Date Tue, 18 Nov 2008 17:24:13 GMT
Hi Pinaki,

I tried what you proposed. It worked partially as the query issue
doesn't include the JOIN:
SELECT t0.id, t0.version, t0.name, t0.b_id 
    FROM dsit_areal_class t0 
    WHERE (t0.b_id = ?) 

However, the B.code is not available as B isn't created (null) despite
the fact all the required information is available in the select's
result (the B's id). The expected behavior was a B instance with only
its id populated.

From here, what you think? Could it be considered as a bug/limit case ?
Do I have a chance to get the B's id without the JOIN, like declaring
the column twice once as a B and secondly as a B_id ? Any other idea ?

Yann

-----Original Message-----
From: Pinaki Poddar [mailto:ppoddar@apache.org] 
Sent: samedi, 15. novembre 2008 23:38
To: users@openjpa.apache.org
Subject: Re: Get @Id field value (FK) without loading entity (JOIN) when
using FetchGroups or Lazy Loading


Hi Michael,
   Did you try with appropriately tuned fetch group to get the effect
you want? For example, consider a fetch group f that includes {A.id,
A.name, B.code} ?  


--
View this message in context:
http://n2.nabble.com/Get-%40Id-field-value-%28FK%29-without-loading-enti
ty-%28JOIN%29-when-using-FetchGroups-or-Lazy-Loading-tp1499463p1504083.h
tml
Sent from the OpenJPA Users mailing list archive at Nabble.com.


____________________________________________________________

 This email and any files transmitted with it are CONFIDENTIAL and intended
  solely for the use of the individual or entity to which they are addressed.
 Any unauthorized copying, disclosure, or distribution of the material within
  this email is strictly forbidden.
 Any views or opinions presented within this e-mail are solely those of the
  author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
 An electronic message is not binding on its sender. Any message referring to
  a binding engagement must be confirmed in writing and duly signed.
 If you have received this email in error, please notify the sender immediately
  and delete the original.

Mime
View raw message