]
Emre BAKKAL moved HHH-6597 to JPA-21:
-------------------------------------
Component/s: (was: annotations)
(was: core)
Affects Version/s: (was: 3.0 final)
1.0.0
Key: JPA-21 (was: HHH-6597)
Project: Java Persistence API (was: Hibernate Core)
org.hibernate.session.isDirty() flushes new rows in a Collection
which has items mapped with id generator "identity"
--------------------------------------------------------------------------------------------------------------------
Key: JPA-21
URL:
http://opensource.atlassian.com/projects/hibernate/browse/JPA-21
Project: Java Persistence API
Issue Type: Bug
Affects Versions: 1.0.0
Environment: JBoss 5.1, JBoss Seam 2.2.1, Hibernate 3.0, MySql 5.5.11
Reporter: Emre BAKKAL
Labels: hibernate
If we call org.hibernate.session.isDirty() after we add a new row to a mapped collection
in a managed Entity, dirty check forces an id assign and executes an insert.
I see that this behavior is caused because of my collection items having id generator and
mapped with cascade type all, but still it's an unexpected behavior. Shouldn't it
return true when it found a new row?
I couldn't find a workaround for this behavior. I wanted to give user a choice to
save the changes or not, if there are changes which have been made.
Setting FlushMode to NEVER does not help either.
This behavior prevents using this method for change tracking, and is not compatible with
the description of the method..
Best Regards..
--
This message is automatically generated by JIRA.
For more information on JIRA, see: