]
Emre BAKKAL moved JPA-21 to HHH-6611:
-------------------------------------
Affects Version/s: (was: 1.0.0)
3.0 final
Key: HHH-6611 (was: JPA-21)
Project: Hibernate Core (was: Java Persistence API)
org.hibernate.session.isDirty() flushes new rows in a Collection
which has items mapped with id generator "identity"
--------------------------------------------------------------------------------------------------------------------
Key: HHH-6611
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6611
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.0 final
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: