|
SOLVED. It turned a change to some triggers in the database was the cause.
Hi,
I have a problem getting NHibernate to accept null values in my foreign composite keys.
I have a hierarchy where each object is linked to its parent(ForgaengerTekniskPladsID / ForgaengerGyldigFra) and the topmost item in the hierarchy should have the parent keys set to null.
When I set the parent keys to existing values in the database it runs smoothly, but when I set the predecessor keys to null, I get this error:
NHibernate.Util.ADOExceptionReporter Cannot insert/update into table "TekniskPladsSetup" because the values entered for "ForgaengerTekniskPladsID", "ForgaengerGyldigFraDato" in "TekniskPladsSetup" must correspond to the values of primary key column(s) of the table "TekniskPladsSetup".
I have looked around for some hours now and googled to no avail. (Nothing with that error message can be found on google).
Do you know what I'm doing wrong, or do you have any suggestions for what I can try to make it work?
I'm confident it's not an issue with the database since this works with the existing data layer.
Thanks in advance.
/Kim
Hibernate version:
1.2.1.4000
|