Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 43394 invoked from network); 18 Oct 2007 06:34:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Oct 2007 06:34:00 -0000 Received: (qmail 23791 invoked by uid 500); 18 Oct 2007 06:33:48 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 23635 invoked by uid 500); 18 Oct 2007 06:33:47 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Delivered-To: moderator for dev@openjpa.apache.org Received: (qmail 18421 invoked by uid 99); 18 Oct 2007 06:30:38 -0000 X-ASF-Spam-Status: No, hits=4.5 required=10.0 tests=DNS_FROM_RFC_DSN,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) From: "vivek" To: Subject: Regarding Fetch groups in OpenJPA Date: Thu, 18 Oct 2007 12:00:24 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C8117E.773EE060" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcgRUF0x3j2EIMqBSBS13alr9of/qg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-Id: <20071018063011.47FFA8AFC2C@gfslho.geojit.com> X-MailServ-MailFilter-MailScanner: Found to be clean, Found to be clean X-MailServ-MailFilter-MailScanner-Information: Please contact the ISP for more information X-MailScanner-From: vivekmv@geojit.com X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0000_01C8117E.773EE060 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Problem :Regarding Fetch groups in OpenJPA. public class EmployeePK { @Column(name = "EmployeeID", nullable = false) private long employeeID; @Column(name = "SerialNo", nullable = false) private int serialNo; } public class Employee { @EmbeddedId protected EmployeePK employeePK; private String firstName; private String lastName; @ManyToOne private Department dept; } public class Department { @Id private int id; private String departmentName; } This is the sample scenario. There are 3 entity classes, one is the primary key class. Here normally if i am not using fetch group feature in OpenJPA, during retrieval all fields will retrieved from employee and department tables. But i need some fields from both the tables to be fetched first. By seeing fetch group documentation, i couldnt get a full idea of how to configure fetch groups for related entities. So please give a sample configuration for the above scenario. ------=_NextPart_000_0000_01C8117E.773EE060--