[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2792?page=c...
]
Chris Rose commented on HHH-2792:
---------------------------------
I'd like to clarify this; this is an issue I'm having, too; I call delete on an
entity with its id field filled in, but the nullability of _all_ of its fields is
validated as an _update_ prior to deletion.
The code in question is in DefaultDeleteEventListener.deleteEntity(
final EventSource session,
final Object entity,
final EntityEntry entityEntry,
final boolean isCascadeDeleteEnabled,
final EntityPersister persister,
final Set transientEntities)
on line 250:
new Nullability( session ).checkNullability( entityEntry.getDeletedState(), persister,
true );
This checks the entity as if it were an update, which causes a PropertyValueException in
the case that the key itself is provided, but no other properties are filled in, which
should not be necessary for a delete operation.
Session.delete is validate all fields are null
----------------------------------------------
Key: HHH-2792
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2792
Project: Hibernate3
Issue Type: Bug
Components: core
Reporter: Daniel Passos
session.delete operation would not have to validate if the fields are null
The problem in DefaultDeleteEventListener.deleteEntity -> Nullability.checkNullability
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira