[hibernate-issues] [Hibernate-JIRA] Resolved: (EJB-368) Detached entity not reported consistently
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Tue Jul 8 23:16:12 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Bernard resolved EJB-368.
----------------------------------
Resolution: Cannot Reproduce
I cannot reproduce what you experience on jdk 1.5.0_13 / Windows XP
The expected behavior is no exception (which is what I see), Country is not persisted by Hibernate during the second call, we just read it's id.
> Detached entity not reported consistently
> -----------------------------------------
>
> Key: EJB-368
> URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-368
> Project: Hibernate Entity Manager
> Issue Type: Bug
> Components: EntityManager
> Affects Versions: 3.3.2.GA
> Environment: ejb3-persistence-1.0.1.GA.jar
> hibernate-entitymanager-3.3.2.GA.jar
> hibernate-3.2.6.ga.jar
> postgresql-8.3-603.jdbc3.jar
> jdk 1.5.0_13/jdk 1.6.0_06
> Windows XP
> Reporter: Henriette Harmse
> Attachments: HibernateTest.zip, HibernateTestReworked.zip
>
>
> The attached code does not fail consistently with a "detached entity" exception.
> Under jdk 1.5 (tested with jdk 1.5.0_10 & 1.5.0_13) it fails with a detached entity exception which is correct. Running the same code against jdk 6 (tested with jdk 1.6.0_06 & jdk 1.6.0_03) passes and the records are written to the database.
> The same code works against jdk 1.5 (and jdk 6) as well when the <mapping-file>META-INF/emailAddress.xml</mapping-file> and <class>example.domain.EmailAddress</class> are commented out from the persistence.xml file.
> The fact that this code does not fail consistently could cause developers to use Hibernate incorrectly which may only be apparent much later into the project.
> In order to run the example:
> 1. Create Postgres database called "example".
> 2. Create "example" user with username and password "example"
> 3. Edit the run.cmd and build.cmd files to set your JAVA_HOME.
> 4. Run "build.cmd".
> 5. Run "run.cmd".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list