openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Prud'hommeaux (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-43) update of a persistent field using a @Lob annotation is not being marked dirty
Date Sun, 10 Sep 2006 17:56:22 GMT
     [ http://issues.apache.org/jira/browse/OPENJPA-43?page=all ]

Marc Prud'hommeaux resolved OPENJPA-43.
---------------------------------------

    Resolution: Invalid

This is actually a known and intractible limitation: we are not able to intercept internal
modifications for opaque types or arrays. So for those types, if OpenJPA is to detect that
they were changed, they need to be re-set in their owning objects. E.g., in addition to doing:

myPC.getSomeBlob().someInternalField++;

you should also do:

myPC.setSomeBlob(myPC.getSomeBlob());

That should be sufficient to mary it "dirty". Alternately, you can use the OpenJPAEntityManager.dirty()
method to explicitly mark the field dirty.

> update of a persistent field using a @Lob annotation is not being marked dirty
> ------------------------------------------------------------------------------
>
>                 Key: OPENJPA-43
>                 URL: http://issues.apache.org/jira/browse/OPENJPA-43
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: David Wisneski
>
> An entity has a persistent field which is a serialable class annotated with @Lob.  I
am able to 
> create and persist instances of this entity and field.  But when the entity is retrieved
and the 
> field is updated, the update is not written back at commit.
> @Entity
>  class Employee {
>   @Id  int id;
>   @Lob  Address home;
> class Home implements Serializable {
>     String street 
>   EntityManager em =
>   em.getTransaction().begin();
>   Employee e = em.find(Employee.class, 1);
>   Address home = e.getHome();
>   home.setStreet("123 New Avenue");
>   e.setHome(e);
>   em.getTransaction().commit();   <--  the update to home address does not occur.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message