有人可以帮我把这个查询翻译成 NHibernate Criteria 吗?或者标准不适合这个?
询问:
SELECT b.*
FROM Bookmarks b
JOIN (SELECT tg.BookmarkId
FROM TagsBookmarks tg
JOIN Tags t ON t.id = tg.TagId
WHERE t.Title IN ('c#','tutorials')
GROUP BY tg.BookmarkId
HAVING COUNT(DISTINCT t.Title) = 2) x ON x.BookmarkId = b.Id