openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1672) Calling EntityManager.detach(...) on 2.0 runtime with a 1.0 level persistence.xml doesn't work
Date Wed, 19 May 2010 21:39:54 GMT
Calling EntityManager.detach(...) on 2.0 runtime with a 1.0 level persistence.xml  doesn't
work
-----------------------------------------------------------------------------------------------

                 Key: OPENJPA-1672
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1672
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 2.0.0
            Reporter: Rick Curtis


I have a testcase which still had a 1.0 persistence.xml[1], but is running against a 2.0 driver.
Calling em.detach(...) doesn't actually detach my Entity. I did some debugging and it appears
that we try to do something tricky and revert back to an "old" way of doing things via a Compatibility
flag... unfortunately this flag is incorrect. As far as I can tell we set this flag (Compatibility.CopyOnDetach),
but since em.detach(...) doesn't have a return type with 2.0, my Entity never gets detached.
To work around this problem I updated my p.xml and everything now works as expected.

Opening this issue so we don't lose track of it.

[1] <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

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


Mime
View raw message