Use cast(o.Id as string).
You can also use AnsiString, etc, depending on your needs.
Diego
On Mon, Jul 19, 2010 at 03:05, alexey_baranov <[email protected]> wrote:
> hi!
>
> I'm trying to get all object's parents doing this query:
>
> from Obj o where :path like o.Path + o.Id+'/%' order by o.Path
>
> And get an error about this expression because o.Path is String '/%'
> is String, but o.Id is Int32? (nullable)
>
> o.Path + o.Id + '/%'
>
> What database independent function has NHibernate to convert o.id to
> string type? Some like this
>
> o.Path + NHConvert(o.Id, String) + '/%'
>
> thanks!
>
> --
> 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.