[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-6957) Throw PropertyValueException if there are unresolved entity insert actions after persist/save/merge listeners execute
Gail Badner (JIRA)
noreply at atlassian.com
Thu Jan 19 19:04:09 EST 2012
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gail Badner updated HHH-6957:
-----------------------------
Description:
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 PropertyValueException would be thrown, regardless of the CHECK_NULLABILITY setting.
was:
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 TransientObjectException would be thrown, regardless of the CHECK_NULLABILITY setting.
> Throw PropertyValueException if there are unresolved entity insert actions after persist/save/merge listeners execute
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HHH-6957
> URL: http://opensource.atlassian.com/projects/hibernate/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 PropertyValueException would be thrown, regardless of the CHECK_NULLABILITY setting.
--
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