Trying to delete an unmapped class/record via the NHibernate sql api. But can't seem to get it working. Does anything look wrong with this?
session = NHibernateHelper.GetCurrentSession();
tx = session.BeginTransaction();
using (tx)
{
session.CreateSQLQuery("DELETE FROM tb_category WHERE parentID = :parentID").SetInt64("parentID",pID);
tx.Commit();
}
Any help appreciated.