From dev-return-10406-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Feb 06 23:11:23 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 27716 invoked from network); 6 Feb 2009 23:11:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2009 23:11:23 -0000 Received: (qmail 37265 invoked by uid 500); 6 Feb 2009 23:11:22 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 37229 invoked by uid 500); 6 Feb 2009 23:11:22 -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 Received: (qmail 37216 invoked by uid 99); 6 Feb 2009 23:11:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2009 15:11:22 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2009 23:11:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 86AC1234C4A9 for ; Fri, 6 Feb 2009 15:10:59 -0800 (PST) Message-ID: <477148140.1233961859537.JavaMail.jira@brutus> Date: Fri, 6 Feb 2009 15:10:59 -0800 (PST) From: "Brian Dellert (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-911) Issue with FetchAttribute recursionDepth MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Issue with FetchAttribute recursionDepth ----------------------------------------- Key: OPENJPA-911 URL: https://issues.apache.org/jira/browse/OPENJPA-911 Project: OpenJPA Issue Type: Bug Affects Versions: 1.2.0 Environment: JDK: Sun 1.6 Database: Derby 10.2.2.0 OS: Windows XP Reporter: Brian Dellert I am attempting to leverage the recursionDepth FetchAttribute on a couple of related JPA entity classes, but OpenJPA does not seem to be honoring the value in a certain scenario. Even if I specify a recursionDepth of 50, a load of the object graph is only returning a recursionDepth of 1 in this scenario. The issue I'm seeing manifests itself when there is a 'container' class which has a OneToOne reference to an 'entity' class, and the 'entity' class has a OneToMany recursive self-reference . Here, when I first create an object graph where an instance of the 'container' class references a 3 level entity graph, I can save the graph and then load the graph and the specified recursionDepth is being honored. If I then delete the 'container' object (which cascades the delete to the 'entity' graph), the delete occurs correctly. But, if I then create/save a new graph of objects, the subsequent load of this new graph does not honor the recursionDepth. I have explicitly added the relevant FetchGroups to the entity manager FetchPlan. It should be noted that I needed to specify FetchGroups on both the OneToOne and OneToMany references described above in order to get the initial load of the graph to succeed. Also, it should be noted that this seemed to work correctly with OpenJPA 1.0.0. The attached jar file contains a simple JUnit test case which illustrates this behavior. The test case can be run using maven by unjarring the attached file and running: mvn install in the openjpa_recursion_test/ directory. There are comments in the test code which further describe the issue. If any additional information is needed, please let me know. Thanks. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.