From: NHibernate J. <mik...@us...> - 2006-11-13 18:03:36
|
[ http://jira.nhibernate.org/browse/NH-611?page=all ] Sergey Koshcheyev updated NH-611: --------------------------------- Fix Version: LATER Version: 1.2.0.Beta2 > Delete without retrieving Object (Delete(Type type, Object key) ) > ----------------------------------------------------------------- > > Key: NH-611 > URL: http://jira.nhibernate.org/browse/NH-611 > Project: NHibernate > Type: New Feature > Components: Core > Versions: 1.2.0.Beta2 > Reporter: Michael Fletcher > Priority: Minor > Fix For: LATER > > I have a bunch of legacy code where I delete an object based on its id. In order for me to delete the object I need to retrieve it or create a query. > Notice n = session.Get(typeof(Notice), noticeId); > session.Delete(n); > or > session.Delete("from Notice n where n.Id=" + noticeId); > It seems more natual to delete an object using the type and identifier of the object similar to ISession.Get(). > Add a method to ISession that deletes an object based on its type and identifier without reading the object. > ISession.Delete(Type clazz, Object id); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |