The check of the expectation is a fundamental check. I have a proposal for you: change the stored procedure. You can't touch it ? well... to work with untouchable code is an hard living; Elliot Ness is not a guy of this century.
On Thu, Apr 22, 2010 at 7:35 AM, mikedoherty <[email protected]>wrote: > Hi, > > I'm not sure if this is the correct place to be asking this question > but I would like to submit a patch for NH-1353 and have some questions > about my proposed solution and whether or not it would be suitable. > > Basically our team need to be able to turn off the expectation that > the number of rows returned from the query matches the number expected > by NHibernate as we have no control over the triggers on our 3rd party > database. It would appear that we are not alone in this requirement. > NH-1353 proposes a potential solution to this problem along with a > patch but it appears that this patch was never accepted. As an > alternative then I would like to propose an alternative, and hopefully > more acceptable, solution. > > Firstly what I would like to propose is that this expectation can be > turned off for an individual entity via the class or collection > mapping. As a result this approach would require a new attribute in > the hbm schema. Is it acceptable to add new attributes or do you need > to keep compatibility with the Java configuration schema? > > Secondly, assuming a new attribute would be acceptable, what name > should I give to the new attribute? Looking at the schema the sql- > insert, sql-update and sql-delete elements allow control over this > using the "check" attribute. However class already has an attribute > called check for constraints. Within the code there are two ways of > referring to this check either as an Expectation or as > ExecuteUpdateResultCheckStyle so maybe the attribute could be called > "expectation" or "check-style"? I would appreciate guidance on this > too. > > Thanks in advance, > > Mike Doherty > > > -- > Subscription settings: > http://groups.google.com/group/nhibernate-development/subscribe?hl=en > -- Fabio Maulo
