Trigger-Identity with Dynamic Insert throws ORA-01036 (10g)
Description
Using NHibernate-2.1.0.CR1, Oracle10gDialect, dynamic-insert="true" and a trigger-identity, the SQL generated is missing the "RETURNING Id INTO :nhIdOutParam" clause, causing an ORA-01036 error. Take out the dynamic-insert, and all is well.
The SQL generated is: INSERT INTO DomainClass (Data) VALUES (0);0 = 'test', :nhIdOutParam = NULL
Meanwhile I remove dynamic-insert from the mapping, but I've have a legacy database that contains tables with up to 180 columns, I need dynamic-insert please...
Marc Tomàs Gleyal
May 26, 2015 at 10:44 AM
I've the same problem using NHibernate-3.3.3SP1 and a custom dialect that inherits from Oracle10gDialect, any news about it?
Steve Trautman
July 17, 2009 at 2:30 PM
Attached is a zipped NHibernate.LiteTestSolution with a NH1893 test case (the dlls were removed from the solution before zipping).
Using NHibernate-2.1.0.CR1, Oracle10gDialect, dynamic-insert="true" and a trigger-identity, the SQL generated is missing the "RETURNING Id INTO :nhIdOutParam" clause, causing an ORA-01036 error. Take out the dynamic-insert, and all is well.
The SQL generated is:
INSERT INTO DomainClass (Data) VALUES (0);0 = 'test', :nhIdOutParam = NULL