Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 28904 invoked from network); 6 Feb 2009 23:15:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2009 23:15:26 -0000 Received: (qmail 40804 invoked by uid 500); 6 Feb 2009 23:15:25 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 40779 invoked by uid 500); 6 Feb 2009 23:15:25 -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 40768 invoked by uid 99); 6 Feb 2009 23:15:25 -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:15:25 -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:15:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0E030234C4A9 for ; Fri, 6 Feb 2009 15:15:02 -0800 (PST) Message-ID: <579262319.1233962102042.JavaMail.jira@brutus> Date: Fri, 6 Feb 2009 15:15:02 -0800 (PST) From: "Brian Dellert (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-911) Issue with FetchAttribute recursionDepth In-Reply-To: <477148140.1233961859537.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brian Dellert updated OPENJPA-911: ---------------------------------- Attachment: openjpa_recursion_test.jar Test case which reproduces issue. > 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 > Attachments: openjpa_recursion_test.jar > > > 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.