openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dianne Richards (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1562) EntityManager:Refresh on Removed entity does not trigger IllegalArgumentException
Date Tue, 16 Mar 2010 03:02:27 GMT


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:
>             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:, 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.

View raw message