Where is the QueryOver here? I was not asking how to use a table function
in NHibernate, my question was "how to use it with QueryOver<>".
Il giorno giovedì 25 ottobre 2012 10:50:28 UTC+2, ggeurts ha scritto:
>
> The way to go here is to use something like
>
> var q = session
> .CreateSQLQuery(@"SELECT * FROM dbo.MyTableFunction() WHERE p.Id >
> :MinId)
> .AddEntity(typeof(SomeTable))
> .SetInt64("MinId", 10);
>
> On Tuesday, 16 October 2012 16:05:11 UTC+2, xanatos wrote:
>
>> I have some table valued functions with parameters. I use them to do some
>> recursive query and some other queries based on "things" not supported by
>> nhibernate (for example OVER PARTITION BY). They return data in the same
>> format as a SELECT * FROM SomeTable where SomeTable is correctly mapped in
>> NHibernate.
>>
>> I want to include this TVF (or the named query that I use for it) in a
>> QueryOver query, for example something like
>>
>> var q = QueryOver.Of<SomeTable>(myTableFunction).Where(p => p.Id >
>> 10);
>>
>> but I don't know how to connect the Session.GetNamedQuery("myquery") that
>> returns an IQuery with the QueryOver, or how to create a
>> Projection.SqlFunction that encapsulates my TVF and use it... Or any other
>> way....
>>
>> Thanks
>>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/pDu-JblMYFMJ.
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.