Hi All,
I have a very slow loading Entity (has a large blob). I want to:
Code:
session.Delete("FROM EntityName WHERE EntityNameID = X");
Without it actually loading the entity first. The entity is not related to anything as is clear through the hbm.xml file. Well I know its not that clear. Here is the hbm.
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="DAL.AttachmentContent, DAL" table="`AttachmentContent`">
<jcs-cache usage="read-write"/>
<id name="ID" column="`AttachmentContentID`" unsaved-value="0"><generator class="native"/></id>
<property name="Contents" column="`Contents`" type="Byte[](16000000)" length="16000000" not-null="true"/>
</class>
</hibernate-mapping>
Is there anyway I can force NH to just run a delete query rather than load the entity then delete it?
Cheers
Guido Tapia
PS: Congrats on all the great news about NH lately, awesome product.