I have the NHibernate mapping file set up correctly for my Marketing List object but I can't delete a record because of the null value in the composite key (I didn't set up the database and the database column can't be changed because of other systems). I get the standard Unexpected row count: 0; expected: 1
Can I do a CreateSQL or CreateHQL to do the delete?
Below is the SQL that NHibernate is spitting out:
DELETE FROM MARKETING_LIST WHERE FK_MJ_MJ_NUMBER = :p0 AND FK_MV_MV_NUMBER = :p1 AND LIST_SYSID = :p2 AND INS_COVERAGE_SUBTYPE = :p3; :p0 = '53494', :p1 = '101', :p2 = '10101', :p3 = ''
Below is the important pieces of the NHibernate Mapping. InsuranceCoverageSubtype is a nullable character column.
namespace="Affinion.M1.Business"
assembly="Affinion.M1.Business"
default-access="field.camelcase-underscore">