If you put square brackets (quoting in the mapping) you should put square brackets in your SP. If you use a mapping-system that puts square brackets everywhere, instead uses it only where really needed (as NH2.1.0 do), you should adapt your work to your choose.
I don't need to do it because: I don’t need to change myself to fit the framework, it fits to me! Try to configure Fluent-NH to avoid the usage of square brackets everywhere and then: http://fabiomaulo.blogspot.com/2009/06/auto-quote-tablecolumn-names.html 2010/3/24 James Crowley <[email protected]> > Hi Fabio. It's a call to a named query > > IQuery query = Session.GetNamedQuery("GetNextQueuedTask"); > query.SetInt32("TaskQueueClientId", clientId); > return query.List<QueuedJob>(); > > with the query defined as > > <sql-query name="GetNextQueuedTask"> > <return class="Common.TaskQueue.Domain.Entities.QueuedJob, > Common.TaskQueue.Domain" /> > exec dbo.GetNextQueuedTask :TaskQueueClientId > </sql-query> > > however, I don't think it's stored proc related... seen this issue > elsewhere too. Will try and get you another example. > > James > > On 24 March 2010 11:52, Fabio Maulo <[email protected]> wrote: > >> which is the query ? >> >> 2010/3/24 James Crowley <[email protected]> >> >>> Hi guys, >>> >>> I keep getting IndexOutOfRangeException's on the current trunk (with code >>> that worked fine in NH 2.1) because it's looking for the primary key in the >>> resultset with square brackets round the column name ("[QueuedTaskId]" >>> instead of "QueuedTaskId") - I've checked and the exception doesn't occur if >>> the parameter is changed to without the brackets? The mapping for the column >>> looks like this: >>> >>> <id name="Id" type="System.Int64, mscorlib, Version=2.0.0.0, >>> Culture=neutral, PublicKeyToken=b77a5c561934e089"> >>> <column name="`QueuedTaskId`" /> >>> <generator class="identity" /> >>> </id> >>> >>> generated by Fluent nHibernate. Any ideas where the problem might lie? >>> >>> Many thanks >>> >>> James >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "nhusers" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]<nhusers%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/nhusers?hl=en. >>> >> >> >> >> -- >> Fabio Maulo >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<nhusers%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- Fabio Maulo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
