You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Catalina Wei (JIRA)" <ji...@apache.org> on 2009/02/18 07:45:01 UTC
[jira] Created: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Bidirectional OneToOne relation incorrectly set in loadEagerJoin
----------------------------------------------------------------
Key: OPENJPA-925
URL: https://issues.apache.org/jira/browse/OPENJPA-925
Project: OpenJPA
Issue Type: Bug
Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
Reporter: Catalina Wei
Assignee: Catalina Wei
A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
@Entity
public class OneOneParent {
...
@OneToOne(mappedBy="parent")
private OneOneChild child;
}
@Entity
public class OneOneChild {
...
@OneToOne
private OneOneParent parent;
}
Testcase:
String query = "select c FROM OneOneChild c";
Query q = em.createQuery(query);
List list = q.getResultList();
for (int i = 0; i < list.size(); i++) {
OneOneChild c = (OneOneChild) list.get(i);
assertEquals(c, c.getParent().getChild());
}
We expect c equals c.getParent().getChild(), but instead got assertion failure.
It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catalina Wei resolved OPENJPA-925.
----------------------------------
Resolution: Fixed
Fix Version/s: (was: 1.2.1)
fix checked in under trunk revision r745408, and 1.3.x at r745409.
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 1.3.0, 2.0.0
>
> Attachments: OPENJPA-925-branches12x.patch, OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-925:
---------------------------------
Fix Version/s: 2.0.0
1.3.0
1.2.1
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 1.2.1, 1.3.0, 2.0.0
>
> Attachments: OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods reassigned OPENJPA-925:
------------------------------------
Assignee: Michael Dick (was: Catalina Wei)
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Michael Dick
> Fix For: 1.3.0, 2.0.0
>
> Attachments: OPENJPA-925-branches12x.patch, OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-925:
---------------------------------
Attachment: OPENJPA-925-branches12x.patch
Changes back ported from trunk to branches/1.2.x. This resolved the junit testcase attached in OPENJPA-919, but still need to run the EJB TCK on Geronimo before I can say its completely resolved.
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Attachments: OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods resolved OPENJPA-925.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.2.1
Also applied to branches/1.2.x by Mike, so marking as resolved. thanks.
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Michael Dick
> Fix For: 1.2.1, 1.3.0, 2.0.0
>
> Attachments: OPENJPA-925-branches12x.patch, OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-925:
---------------------------------
Attachment: OPENJPA-925-branches12x.patch
Updated patch for branches/1.2.x which includes the latest updates made to trunk in r745597.
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 1.2.1, 1.3.0, 2.0.0
>
> Attachments: OPENJPA-925-branches12x.patch, OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674760#action_12674760 ]
Donald Woods commented on OPENJPA-925:
--------------------------------------
Catalina, please apply this fix to the 1.2.x branch, as it fixed the EJB TCK failures we were seeing in Geronimo 2.1.4 with OpenEJB 3.0.1. Thanks.
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 1.2.1, 1.3.0, 2.0.0
>
> Attachments: OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods reopened OPENJPA-925:
----------------------------------
This also needs to be applied against the 1.2.x branch to resolve a EJB TCK issue found by Geronimo.
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
> Fix For: 1.3.0, 2.0.0
>
> Attachments: OPENJPA-925-branches12x.patch, OPENJPA-925-branches12x.patch
>
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-925) Bidirectional OneToOne relation
incorrectly set in loadEagerJoin
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674651#action_12674651 ]
Donald Woods commented on OPENJPA-925:
--------------------------------------
Catalina, this looks like like it resolved my testcase for OPENJPA-919, so can we get this back ported to the 1.2.x branch?
I'll create a patch and attach it, as I need to apply this to my local 1.2.x code and rerun the failing EJB TCK testcases for Geronimo to verify that this did fix our problems.
> Bidirectional OneToOne relation incorrectly set in loadEagerJoin
> ----------------------------------------------------------------
>
> Key: OPENJPA-925
> URL: https://issues.apache.org/jira/browse/OPENJPA-925
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0
> Reporter: Catalina Wei
> Assignee: Catalina Wei
>
> A test scenario uncovers a bug in eager loading bidirectional OneToOne relation.
> OneOneParent has a bidirectional OneToOne relation with OneOneChild as annotated as following:
> @Entity
> public class OneOneParent {
> ...
> @OneToOne(mappedBy="parent")
> private OneOneChild child;
> }
> @Entity
> public class OneOneChild {
> ...
> @OneToOne
> private OneOneParent parent;
> }
> Testcase:
> String query = "select c FROM OneOneChild c";
> Query q = em.createQuery(query);
> List list = q.getResultList();
> for (int i = 0; i < list.size(); i++) {
> OneOneChild c = (OneOneChild) list.get(i);
> assertEquals(c, c.getParent().getChild());
> }
> We expect c equals c.getParent().getChild(), but instead got assertion failure.
> It seems to be a bug introduced in performance improvement work (the related issues: OPENJPA-292 & OPENJPA-744).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.