Groups
Groups
Sign in
Groups
Groups
nhusers
Conversations
About
Send feedback
Help
Join and Table-valued function
31 views
Skip to first unread message
Alexander Byndyu
unread,
Jan 24, 2013, 1:13:00 AM
1/24/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhu...@googlegroups.com
Hello,
How can I create query:
SELECT
*
FROM Post po
INNER JOIN
GetPostBySearchQuery('search query') s ON s.Id = po.PostId
GetPostBySearchQuery - table-valued function, returns PostId list.
Oskar Berggren
unread,
Jan 24, 2013, 1:41:57 AM
1/24/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhu...@googlegroups.com
ISession.CreateSQLQuery(), or use a named-query. See the NHibernate
reference documentation.
/Oskar
2013/1/24 Alexander Byndyu <
alexande...@gmail.com
>:
> --
> 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/-/LJzQI01UoyQJ
.
> To post to this group, send email to
nhu...@googlegroups.com
.
> To unsubscribe from this group, send email to
>
nhusers+u...@googlegroups.com
.
> For more options, visit this group at
>
http://groups.google.com/group/nhusers?hl=en
.
Alexander Byndyu
unread,
Jan 24, 2013, 5:27:46 AM
1/24/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhu...@googlegroups.com
More correct formulation of the question:
Simplified code:
IQueryOver<Post, Post> query =
Session.QueryOver<Post>();
if (string.IsNullOrEmpty(criterion.SearchQuery) == false)
{
// join results from GetPostBySearchQuery function
}
If criterion.SearchQuery is not empty I should call Sphinx function.
SQL result should by like:
SELECT * FROM Post po
INNER JOIN GetPostBySearchQuery('search query') s ON s.Id = po.PostId
Best regards,
Byndyu Alexander
2013/1/24 Oskar Berggren
<
oskar.b...@gmail.com
>
Reply all
Reply to author
Forward
0 new messages