thanks Sergey.
changing the generator type definitely made it start using the stored procedure for inserts, but now I have a new problem...
I have an existing database, and as part of that the same stored procedures are being used for both inserts and updates (as you can see in my mapping). in my current application I am generating the ID field for the object/row within the stored procedure and returning that as either an output parameter or return value - so for an insert I would provide an ID = 0 and the procedure would know to do an insert and generate the ID for me, for an update I would just pass in the actual ID of the row and the procedure knows to do an update instead.
so what I would like NHibernate to do in this case is to use the stored procedure for the insert, and ALSO be able to automatically populate the ID in the object subsequent to that procedure call. this doesn't seem possible without some kind of output parameter/return value coming from the procedure and some way of telling NHibernate to look at it.
have a run into a show stopper (assuming I can't change the way my database/procedures currently work)?
|