mirror of
https://github.com/apache/openjpa.git
synced 2025-02-25 20:18:31 +00:00
OPENJPA-1482:
Prevent NoSuchMethodError when calling setVersion. Submitted By : Rick Curtis git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@905835 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cbf700e499
commit
a720a9c6f6
@ -3714,7 +3714,8 @@ public class PCEnhancer {
|
||||
v.setTransient(true);
|
||||
loadManagedInstance(code, true);
|
||||
code.constant().setValue(1);
|
||||
addSetManagedValueCode(code, v);
|
||||
// pcVersionInit = true;
|
||||
putfield(code, null, v.getName(), v.getDeclaredType());
|
||||
}
|
||||
code.vreturn();
|
||||
|
||||
|
@ -75,6 +75,14 @@ public class TestDetachNoStateField extends SingleEMFTestCase {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This testcase was added for OPENJPA-1482.
|
||||
*/
|
||||
public void testSetVersionPropertyAccess() {
|
||||
NoDetachedStateEntityPropertyAccess entity = new NoDetachedStateEntityPropertyAccess();
|
||||
entity.setVersion(1);
|
||||
}
|
||||
|
||||
void loadDB() {
|
||||
OpenJPAEntityManagerSPI em = emf.createEntityManager();
|
||||
em.getTransaction().begin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user