The following comment has been added to this issue:
Author: Max Rydahl Andersen
Created: Mon, 5 Jan 2004 8:55 AM
Body:
hibernate needs to honor lifecycle and other stuff - so it is required to load the object.
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-601
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-601
Summary: delete(Serializable pk) in session
Type: New Feature
Status: Unassigned
Priority: Major
Project: Hibernate2
Components:
core
Assignee:
Reporter: belcore walter
Created: Mon, 5 Jan 2004 8:46 AM
Updated: Mon, 5 Jan 2004 8:55 AM
Description:
Why ther isn't a delete method like delete(Serializable pk) ? Where pk is a composite id o a primary key
Now, if want delete a object, I should before load it e after delete. So Hibernate makes two (select and delete) sql istance.
With my suggestion I can delete a object with this code:
MyCompositeId pk= new MyCompositeId("ABC22",2);
session.delete(pk);
and Hibernate will make only a sql like:
delete from FOO where COD='ABC22' and INCREMENT=2
---------------------------------------------------------------------
JIRA INFORMATION:
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.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|