You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Robert Krier (JIRA)" <ji...@apache.org> on 2008/06/09 18:05:45 UTC
[jira] Created: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Issue Found With Recursive One-To_Many Relations in 1.1.0
---------------------------------------------------------
Key: OPENJPA-628
URL: https://issues.apache.org/jira/browse/OPENJPA-628
Project: OpenJPA
Issue Type: Bug
Affects Versions: 1.1.0
Environment: Does not appear to be affect by environment (OS or DB Platform)
Reporter: Robert Krier
Priority: Critical
There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
Scenario 1:
1) Create a "Tree" object.
2) Add one or more "Node" objects to "Tree"
3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
4) Persist and commit "tree".
5) Close the entity manager.
Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
Scenario 2:
1) Create a "Tree" object.
2) Add one or more "Node" objects to "Tree"
3) Persist and commit the tree.
4) Close the entity manager.
Result: The tree and nodes are persisted to the database as expected.
5) Read the "tree" from a new entity manager
6) Add child nodes to one or more of the "nodes" objects associated with "tree"
7) Commit the "tree"
8) Close the entity manager.
Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
Counters:
PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
Counter: NUMERIC(18,0) (18, 0) NOT NULL
Trees:
OID: NUMERIC(18,0) PrimaryKey, NOT NULL
ParentOID: NUMERIC(18,0) NULL
Sequence: NUMERIC(18,0) NULL
Name: VARCHAR(50) NOT NULL
Version: NUMERIC(18,0) NOT NULL
Nodes:
OID: NUMERIC(18,0) PrimaryKey, NOT NULL
Name: VARCHAR(50) NOT NULL
Version: NUMERIC(18,0) NOT NULL
Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Robert Krier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603653#action_12603653 ]
Robert Krier commented on OPENJPA-628:
--------------------------------------
Patrick,
I found the optimization you made for revision 610922 created this problem. When I revert "org.apache.openjpa.util.ProxyCollections" to the previous revision (553010) the problem goes away.
The problem appears to me that if you always call List.add(index, object) where index always equals the size of the list, the dirty state of the object does not correctly get set. For example:
list.add(0, obj1);
list.add(1, obj2);
list.add(2, obj3);
does not work, but:
list.add(0, obj1);
list.add(0, obj2);
list.add(0, obj3);
does, and:
list.add(obj1);
list.add(obj2);
list.add(obj3);
does as well.
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Priority: Critical
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Robert Krier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Krier updated OPENJPA-628:
---------------------------------
Attachment: One2Many_issue_1.1.0.zip
This is the source code used to reproduce the problem I've described.
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Priority: Critical
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick resolved OPENJPA-628.
----------------------------------
Resolution: Fixed
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Assignee: Michael Dick
> Priority: Critical
> Fix For: 1.2.0
>
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick updated OPENJPA-628:
---------------------------------
Fix Version/s: 1.2.1
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Priority: Critical
> Fix For: 1.2.1
>
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick reassigned OPENJPA-628:
------------------------------------
Assignee: Michael Dick
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Assignee: Michael Dick
> Priority: Critical
> Fix For: 1.2.0
>
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Robert Krier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Krier updated OPENJPA-628:
---------------------------------
Component/s: kernel
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Priority: Critical
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619248#action_12619248 ]
Pinaki Poddar commented on OPENJPA-628:
---------------------------------------
=============================================================================
r610922 | pcl | 2008-01-10 14:37:36 -0600 (Thu, 10 Jan 2008) | 1 line
proxy collection optimization for adding to the end of a list vs. adding elsewhere
==============================================================================
Yes -- this is a change with far-reaching consequences including regression of this test case :)
610922 should be reverted back.
It is changing code paths that dynamic proxies (generated in bytecode) depend on.
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Priority: Critical
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-628) Issue Found With Recursive
One-To_Many Relations in 1.1.0
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick updated OPENJPA-628:
---------------------------------
Fix Version/s: (was: 1.2.1)
1.2.0
Re-targetting since we've re-spun 1.2.0
> Issue Found With Recursive One-To_Many Relations in 1.1.0
> ---------------------------------------------------------
>
> Key: OPENJPA-628
> URL: https://issues.apache.org/jira/browse/OPENJPA-628
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0
> Environment: Does not appear to be affect by environment (OS or DB Platform)
> Reporter: Robert Krier
> Priority: Critical
> Fix For: 1.2.0
>
> Attachments: One2Many_issue_1.1.0.zip
>
>
> There seems to be an issue with recursive one-to-many relations that did not exist prior to 1.1.0. I have tested my scenario on both 1.0.1 and 1.0.2 and the behavior works as expected, but the exact same scenario does not work under 1.1.0. It seems that level two joins do not persist on an update of an object graph.
> To illustrate my problem I've included the source and a application to run the test. The entity classes are as follows:
> 1) A given "Tree" object holds one-to-many "Node" objects. "Tree" is neither derived by nor derived from any other classes.
> 2) A given "Node" object holds one-to-many child "Node" objects. "Node" is neither derived by nor derived from any classes.
> Scenario 1:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Add one or more child "Node" objects to one or more of the "node" objects associated with "tree".
> 4) Persist and commit "tree".
> 5) Close the entity manager.
> Result: The tree, nodes and child nodes are persisted to the database as expected. Referential integrity is correct.
> Scenario 2:
> 1) Create a "Tree" object.
> 2) Add one or more "Node" objects to "Tree"
> 3) Persist and commit the tree.
> 4) Close the entity manager.
> Result: The tree and nodes are persisted to the database as expected.
> 5) Read the "tree" from a new entity manager
> 6) Add child nodes to one or more of the "nodes" objects associated with "tree"
> 7) Commit the "tree"
> 8) Close the entity manager.
> Result: Under 1.0.1 and 1.0.2, the child nodes are persisted to the database as expected. Referential integrity is correct. Under 1.1.0, the child nodes are not persisted to the database. No errors or exceptions are thrown. This appears to be broken with the 1.1.0 release.
> I have included my test application for you to review. The test was run against a SQL Server database, however you should be able to easily modify the persistence.xml file to run against any database platform you wish. The table structure is as follows:
> Counters:
> PrimKey: NUMERIC(18,0) (18,0) PrimaryKey, NOT NULL
> Counter: NUMERIC(18,0) (18, 0) NOT NULL
>
> Trees:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> ParentOID: NUMERIC(18,0) NULL
> Sequence: NUMERIC(18,0) NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Nodes:
> OID: NUMERIC(18,0) PrimaryKey, NOT NULL
> Name: VARCHAR(50) NOT NULL
> Version: NUMERIC(18,0) NOT NULL
> Please let me know if you have any questions. Thanks for your attention into this matter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.