oracle - NHibernate - Deleting objects with composite PK, when one of the PK columns is NULL -


Hey, I'm trying to remove one unit of the following structure from Oracle 10G tables:

< Pre> square records {string id; String name; Date time date time; }

with the following mapping:

  & lt; Class name = "records" table = "recs" & gt; & Lt; Total-ID & gt; & Lt; Key-property name = "P_ID" /> & Lt; Key-property name = "NAME" /> & Lt; / Id & gt; & Lt; Property Name = "Date Time" column = "DATE_TIME_V" /> & Lt; / Square & gt; Now, say, that table has PK P_ID and NAME column (composite key), when NAME allows but P_ID does not. Now, this issue is that when NHibernate tries to delete an object with P_ID = 9 and NAME = NULL, it produces the following statement:  
  from RECS Delete where RP_ID = 9 and NAME = NULL  

OBiOsili will not remove anything, because 'NAME = NULL' should be 'NAME IS NULL' Do I remember something here Like NHibernate, does any other value cause the cure to cure?

Thanks, Herrell

"Say PK P_ID of the table and NAME is the column (composite key), when NAME permits "

Not possible The primary key column can not be zero You have a table without a primary key, that is why You are having problems.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -