openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ekin Sokmen (JIRA)" <>
Subject [jira] Commented: (OPENJPA-333) ManyToMany relationship not handled properly while using DataCache.
Date Thu, 13 Sep 2007 11:24:32 GMT


Ekin Sokmen commented on OPENJPA-333:

Initially I was working with rev. 550774. After your comment I checked out the HEAD revision
(574997) and also revision 570948. After running the test on both revisions we have still
the same problem. The output is attached. 
(I'm starting the test using the command: [openjpa-persistence-jdbc]$ mvn test -Dtest=TestCachedJoin)

> ManyToMany relationship not handled properly while using DataCache.
> -------------------------------------------------------------------
>                 Key: OPENJPA-333
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache
>    Affects Versions: 1.0.0
>         Environment: Linux Fedora 6
> Java SE 1.5.0_11
>            Reporter: Ekin Sokmen
>         Attachments:, JIRA333Success.doc,
> We are implementing WS-methods using POJOs and OpenJPA. Following description is a simplified
model of the issue we are facing. There is also a test case attached which demonstrates the
described problem.
> Assume that we have 2 entities EntityA and EntityB in ManyToMany relationship. We are
going to create a new instance of EntityA and add an existing instance of EntityB to it. We
are creating a new POJO instance of EntityA and add a fully populated offline instance of
EntityB to it. This instance of EntityA is serialized and sent to the server where we are
just doing "persist" on this entity. Without DataCache this is working fine. 
> If we enable DataCache and create a new instance of EntityA as described above the entity
is persisted successfully but if we retrieve the instance using OpenJPA we get the instance
of EntityA but the list of EntityB is not populated properly, which means we have a set of
EntityB which is not null and the size is >0 but the content is just null.
> As a hint: if we debug the code we end up just after commit of new instance where the
cache is updated. The enhanced method "pcFetchObjectId" of EntityB is called but the EntityB
is a detached object so it returns null and the list of EntityB in EntityA consists of a list
of nulls. 

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

View raw message