You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jerry Carter (JIRA)" <ji...@apache.org> on 2010/03/11 18:54:27 UTC
[jira] Created: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Basic negative tests of the EntityManager fail
----------------------------------------------
Key: OPENJPA-1562
URL: https://issues.apache.org/jira/browse/OPENJPA-1562
Project: OpenJPA
Issue Type: Bug
Affects Versions: 2.0.0-beta2
Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
Reporter: Jerry Carter
Attachments: simple_entity_tests.txt
My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845911#action_12845911 ]
Michael Dick commented on OPENJPA-1562:
---------------------------------------
Hi Dianne, you're right per the spec a managed entity is one that has a persistent identity and is associated with the persistence context. A removed entity fits that description.
I still think we can be a bit smarted about code reuse, but that's secondary to this issue - consider both my questions answered :-)
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Carter updated OPENJPA-1562:
----------------------------------
Attachment: openjpa1562.tar.zip
Donald: interesting suggestions. My persistence.xml file is pulling in the 2.0 namespace and specifies version 2.0. I am now running against the OpenJPA-2.0.0.SNAPSHOT.jar and the behavior is unchanged.
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849297#action_12849297 ]
Jerry Carter commented on OPENJPA-1562:
---------------------------------------
The patch works for me. I tested with beta3 build from the staging area.
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845538#action_12845538 ]
Michael Dick commented on OPENJPA-1562:
---------------------------------------
Thanks for the patch Dianne, but I have a couple of questions.
1. The javadoc for lock() and refresh() is very similar regarding detached entities :
For lock() :
@throws IllegalArgumentException if the instance is not an
entity or is a detached entity
For refresh() :
@throws IllegalArgumentException if the instance is not
an entity or the entity is not managed
Seems like we'd want to the same thing for refresh and lock (basically the if check for REFRESH can be removed).
2. This is more of a general question - your patch didn't introduce it but the assertValidAttchedEntity() method is very similar to contains(). There is a subtle difference in that contains checks whether the type is managed by this persistence context, and assertValidAttachedEntity checks whether the StateManager is persistent. There's also a slight difference in the exceptions thrown. Still it seems like we'd want to reuse the logic, and rather than duplicating the code.
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Dianne Richards (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844566#action_12844566 ]
Dianne Richards commented on OPENJPA-1562:
------------------------------------------
I have reproduced this latest problem with remove/refresh and am looking into it.
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods resolved OPENJPA-1562.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0-beta3
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Fix For: 2.0.0-beta3
>
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846021#action_12846021 ]
Jeremy Bauer commented on OPENJPA-1562:
---------------------------------------
Committed patch.txt dated 2010-03-15 04:44 PM for Dianne under revision 923849.
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (OPENJPA-1562) Basic negative tests of
the EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844302#action_12844302 ]
Jerry Carter edited comment on OPENJPA-1562 at 3/12/10 12:48 AM:
-----------------------------------------------------------------
Donald: I think you are on the right track. At DEBUG level, I see 'PersistenceVersion=1.0' during OpenJPA initialization. Now to figure out why.
was (Author: no1uno):
Donald: I think you were on the right track. At DEBUG level, I see 'PersistenceVersion=1.0' during OpenJPA initialization. Now to figure out why.
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Dianne Richards (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845673#action_12845673 ]
Dianne Richards commented on OPENJPA-1562:
------------------------------------------
Thanks for reviewing this patch Mike.
For question #1:
When I first made the change and ran all of the tests, one set of lock tests failed because of remove followed by lock.
So, I searched through the spec related to this. Section 3.2.5 says, for a refresh operation, "If X is a new, detched, or removed entity, the IllegalArgumentException is thrown." In other parts of the spec (including the javadoc that you quoted), it says an IllegalArgumentException is thrown for a Lock request on a "detached" entity. But, I couldn't find any such statement fot a "removed" entity.
For question #2
At this point, I don't have an answer. I'll do a little digging.
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Dianne Richards (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dianne Richards updated OPENJPA-1562:
-------------------------------------
Attachment: patch.txt
Attached patch for this problem.
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Carter updated OPENJPA-1562:
----------------------------------
Priority: Minor (was: Major)
Summary: EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException (was: Basic negative tests of the EntityManager fail)
Revised the bug description to reflect the narrowed scope and changed the state to minor as there are clear workarounds.
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Carter updated OPENJPA-1562:
----------------------------------
Attachment: openjpa1562.tar.zip
Basic unit test showing the failure. Note that there is a parallel email thread in which Fay Wang could not reproduce the issue. <http://n2.nabble.com/Refreshing-detached-entities-tp4717312p4718095.html>
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Carter updated OPENJPA-1562:
----------------------------------
Attachment: simple_entity_tests.txt
Here are the test cases and their output.
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Attachments: simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844302#action_12844302 ]
Jerry Carter commented on OPENJPA-1562:
---------------------------------------
Donald: I think you were on the right track. At DEBUG level, I see 'PersistenceVersion=1.0' during OpenJPA initialization. Now to figure out why.
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844198#action_12844198 ]
Donald Woods commented on OPENJPA-1562:
---------------------------------------
Which Spec level did you specify in your persistence.xml and what properties did you set?
A JPA 1.0 level persistence.xml will automatically use compatibility settings to behave like OpenJPA 1.x -
http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_remote.html#ref_guide_detach
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Carter reopened OPENJPA-1562:
-----------------------------------
Considerable progress. Now only one of the twenty tests fails.
TestEntity refreshRemoved = new TestEntity("refresh removed");
em.persist(refreshRemoved);
em.flush();
em.remove(refreshRemoved);
em.flush();
em.refresh(refreshRemoved);
This should throw an IllegalArgumentException, but does not.
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Dianne Richards (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dianne Richards reassigned OPENJPA-1562:
----------------------------------------
Assignee: Dianne Richards
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Carter resolved OPENJPA-1562.
-----------------------------------
Resolution: Invalid
Spring 3.0 is reporting the wrong version (1.0) for the PersistenceVersion. <http://jira.springframework.org/browse/SPR-6975>
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Jerry Carter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Carter updated OPENJPA-1562:
----------------------------------
Attachment: (was: openjpa1562.tar.zip)
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (OPENJPA-1562) EntityManager:Refresh on Removed
entity does not trigger IllegalArgumentException
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick closed OPENJPA-1562.
---------------------------------
Closing on Jerry's behalf.
> EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Priority: Minor
> Fix For: 2.0.0-beta3
>
> Attachments: openjpa1562.tar.zip, patch.txt, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1562) Basic negative tests of the
EntityManager fail
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844200#action_12844200 ]
Donald Woods commented on OPENJPA-1562:
---------------------------------------
Add post 2.0.0-beta2, the fix for OPENJPA-1097 has been integrated, which fixes a bug where EM.clear() was not removing some $proxy class wrappers from the entities....
> Basic negative tests of the EntityManager fail
> ----------------------------------------------
>
> Key: OPENJPA-1562
> URL: https://issues.apache.org/jira/browse/OPENJPA-1562
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 2.0.0-beta2
> Environment: Mac OS X, OpenJPA 2.0.0-beta2, Spring 3.0
> Reporter: Jerry Carter
> Assignee: Dianne Richards
> Attachments: openjpa1562.tar.zip, simple_entity_tests.txt
>
>
> My application unit tests turned up some unexpected behavior from basic OpenJPA entity manager functions. It appears, for instance, that a detached entity can still be refreshed. I decided to write a few basic tests (attached) which report five potential errors. This does not go into the testing of cascading behavior which would require additional work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.