I checked and the `quotes are a valid syntax for escaping table names in the
NH mapping (it was discussed here:
http://code.google.com/p/fluent-nhibernate/issues/detail?id=55)

And just to follow up, it does look like a NamedQuery issue after all.
Calling

Session.Get<QueuedJob>((long)00000); // where 000 is a valid ID of a
QueuedJob entity

works fine.

Fabio - if you need any more info to reproduce just let me know :)

On 24 March 2010 12:19, Robert Rudduck <[email protected]> wrote:

> The ` quotes on the column name are probably doing it.
>
> On Wed, Mar 24, 2010 at 6:38 AM, James Crowley <[email protected]>wrote:
>
>> 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.
>>
>
>  --
> 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].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to