[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-6957) Throw TransientPropertyValueException if there are unresolved entity insert actions after persist/save/merge listeners execute

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Feb 8 23:22:41 EST 2012


     [ https://hibernate.onjira.com/browse/HHH-6957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-6957.
-------------------------------


Closing for 4.1 release

> Throw TransientPropertyValueException if there are unresolved entity insert actions after persist/save/merge listeners execute
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-6957
>                 URL: https://hibernate.onjira.com/browse/HHH-6957
>             Project: Hibernate ORM
>          Issue Type: Improvement
>          Components: core
>            Reporter: Gail Badner
>            Assignee: Gail Badner
>             Fix For: 4.1.0
>
>
> The current behavior (before this proposed change) is kind of complicated when an entity has a non-nullable, transient reference that is not resolved by cascading.
> When CHECK_NULLABILITY is true:
> - persist/save/merge event listeners will throw PropertyValueException;
> When CHECK_NULLABILITY is false:
> - if the entity insert action is executed before the session is flushed (i.e., an "early" insert to generate an identity ID), then JDBCException is thrown;
> - otherwise, TransientObjectException is thrown when the owning entity is dirty-checked.
> The proposed change would make the behavior consistent for all of these cases. If there are any "unresolved" non-nullable, transient entities after the top-level persist/save/merge event executes, then TransientPropertyValueException would be thrown, regardless of the CHECK_NULLABILITY setting.
> TransientPropertyValueException will extend TransientObjectException and will have the transient entity name and property path available (like PropertyValueException). Since it extends TransientObjectException, it will be remapped properly by Entity Manager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list