You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Dain Sundstrom (JIRA)" <ji...@apache.org> on 2007/08/15 00:29:30 UTC

[jira] Created: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Unenhanced OneToMany collection not loaded
------------------------------------------

                 Key: OPENJPA-316
                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
             Project: OpenJPA
          Issue Type: Bug
            Reporter: Dain Sundstrom
             Fix For: 1.0.0


Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.

Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-316:
------------------------------------

    Fix Version/s:     (was: 1.1.0)
                   1.2.0

> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.2.0
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey resolved OPENJPA-316.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.0.2)

> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.1.0
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Dain Sundstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dain Sundstrom updated OPENJPA-316:
-----------------------------------

    Attachment: OPENJPA-316.patch

> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.0.0
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542891 ] 

Patrick Linskey commented on OPENJPA-316:
-----------------------------------------

FTR, this is happening because in a Java 5 vm without a javaagent, OpenJPA cannot intercept field accesses, so fields that are not eagerly loaded are not available. The docs indicate that this is only an issue for one-to-one and many-to-one, but it turns out it's also an issue for collections and maps.

This can be worked around by running java like so:

    java -javaagent:path/to/openjpa.jar=RuntimeEnhancement=false

Of course, if you left the runtime enhnacement on, the problem would also not occur, but that would incur the classload penalties associated with javaagent-based enhancement. When RuntimeEnhancement is set to false, the javaagent just registers an Instrumentation so that OpenJPA can redefine classes on demand in a Java 5 environment.

> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.0.2, 1.1.0
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Dain Sundstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dain Sundstrom reopened OPENJPA-316:
------------------------------------


I would expect that when in unenhanced mode, OpenJPA would eager load all fields and store all changed fields like Hibernate does.  This isn't efficient, but that is fine for unenhanced applications.  The alternative is strange behavior that can result in corrupt data (load data, make calculation based on missing data, and store it == corruption).



> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.1.0
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marc Prud'hommeaux updated OPENJPA-316:
---------------------------------------

    Fix Version/s:     (was: 1.0.0)
                   1.0.1

Bumping to release 1.0.1 since 1.0.0 is being released.

> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.0.1
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee updated OPENJPA-316:
-------------------------------

    Fix Version/s:     (was: 1.0.1)
                   1.1.0
                   1.0.2

Defer to next release.

> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.0.2, 1.1.0
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-316) Unenhanced OneToMany collection not loaded

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick updated OPENJPA-316:
---------------------------------

    Fix Version/s:     (was: 1.2.0)
                   1.3.0
                   1.2.1

Targetting for 1.2.1 and 1.3.0. 

> Unenhanced OneToMany collection not loaded
> ------------------------------------------
>
>                 Key: OPENJPA-316
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-316
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Dain Sundstrom
>             Fix For: 1.2.1, 1.3.0
>
>         Attachments: OPENJPA-316.patch
>
>
> Unenhanced OneToMany fields are not loaded when using a new entity manager.  The fields appear to work when reusing a resource local em across multiple transactions, but when a new em is created the OneToMany field will be null.
> Attached is a test case that reproduces this problem.  The test method has been disabled so the build will not break.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.