You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Arne Limburg (JIRA)" <ji...@apache.org> on 2009/01/17 23:52:59 UTC

[jira] Created: (OPENJPA-862) Wrong id-parameter used for prepared statement when fetching a collection

Wrong id-parameter used for prepared statement when fetching a collection
-------------------------------------------------------------------------

                 Key: OPENJPA-862
                 URL: https://issues.apache.org/jira/browse/OPENJPA-862
             Project: OpenJPA
          Issue Type: Bug
          Components: datacache
    Affects Versions: 1.2.0
            Reporter: Arne Limburg


When fetching a collection that is a property of an entity that was fetched through a collection, too, under some (reproducable) circumstances the collection is empty instead of filled with the correct entities.

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


[jira] Closed: (OPENJPA-862) Wrong id-parameter used for prepared statement when fetching a collection

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

Arne Limburg closed OPENJPA-862.
--------------------------------


> Wrong id-parameter used for prepared statement when fetching a collection
> -------------------------------------------------------------------------
>
>                 Key: OPENJPA-862
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-862
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 1.2.0
>            Reporter: Arne Limburg
>             Fix For: 1.2.1
>
>         Attachments: OPENJPA-862.zip
>
>
> When fetching a collection that is a property of an entity that was fetched through a collection, too, under some (reproducable) circumstances the collection is empty instead of filled with the correct entities.

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


[jira] Resolved: (OPENJPA-862) Wrong id-parameter used for prepared statement when fetching a collection

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

Arne Limburg resolved OPENJPA-862.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.1

Hi Fay,
Sorry for the late reply. I was using 1.2.0. With 1.2.1 the problem is gone.

> Wrong id-parameter used for prepared statement when fetching a collection
> -------------------------------------------------------------------------
>
>                 Key: OPENJPA-862
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-862
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 1.2.0
>            Reporter: Arne Limburg
>             Fix For: 1.2.1
>
>         Attachments: OPENJPA-862.zip
>
>
> When fetching a collection that is a property of an entity that was fetched through a collection, too, under some (reproducable) circumstances the collection is empty instead of filled with the correct entities.

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


[jira] Commented: (OPENJPA-862) Wrong id-parameter used for prepared statement when fetching a collection

Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664876#action_12664876 ] 

Arne Limburg commented on OPENJPA-862:
--------------------------------------

When analyzing the executed sql of the test-case, I recognized that OpenJPA uses the wrong Pet-ID during selection of the visits for the second pet. It uses the ID of the first pet instead.

>From this observation I guess this is a caching problem. As a new entity-manager is used for every query (doing this within one entity-manager seems to work fine) the caching problem must be somewhere in the entity-manager-factory.

> Wrong id-parameter used for prepared statement when fetching a collection
> -------------------------------------------------------------------------
>
>                 Key: OPENJPA-862
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-862
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 1.2.0
>            Reporter: Arne Limburg
>         Attachments: OPENJPA-862.zip
>
>
> When fetching a collection that is a property of an entity that was fetched through a collection, too, under some (reproducable) circumstances the collection is empty instead of filled with the correct entities.

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


[jira] Updated: (OPENJPA-862) Wrong id-parameter used for prepared statement when fetching a collection

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

Arne Limburg updated OPENJPA-862:
---------------------------------

    Attachment: OPENJPA-862.zip

The attached test reproduces the problem. I'm sorry it contains so many entities, but I was not able to reproduce the problem with a smaller set of entities.

> Wrong id-parameter used for prepared statement when fetching a collection
> -------------------------------------------------------------------------
>
>                 Key: OPENJPA-862
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-862
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 1.2.0
>            Reporter: Arne Limburg
>         Attachments: OPENJPA-862.zip
>
>
> When fetching a collection that is a property of an entity that was fetched through a collection, too, under some (reproducable) circumstances the collection is empty instead of filled with the correct entities.

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


[jira] Commented: (OPENJPA-862) Wrong id-parameter used for prepared statement when fetching a collection

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664925#action_12664925 ] 

Fay Wang commented on OPENJPA-862:
----------------------------------

Hi Arne, I could not reproduce your problem. What is the level of openjpa 1,2.x you are using? 

> Wrong id-parameter used for prepared statement when fetching a collection
> -------------------------------------------------------------------------
>
>                 Key: OPENJPA-862
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-862
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 1.2.0
>            Reporter: Arne Limburg
>         Attachments: OPENJPA-862.zip
>
>
> When fetching a collection that is a property of an entity that was fetched through a collection, too, under some (reproducable) circumstances the collection is empty instead of filled with the correct entities.

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