We have a small problem with what seemed to be an easy enough
query ...

            var newsGroupTitles = new[] { "CRU Steel News" };
            var tagTitles = new[] { "Steel sheet" };
            var criteria = DetachedCriteria.For(typeof(Article),
"article")
            .CreateCriteria("article.NewsGroupList", "newsGroups")
            .Add(Property.ForName("newsGroups.Title").In(newsGroupTitles))
            .CreateCriteria("article.TagList", "tags")
            .Add(Property.ForName("tags.Title").In(tagTitles))
            .AddOrder(new Order("article.Date", true));

Which returns back a list of articles that are in one of the newgroups
and one of the tags specified.

We only wanted the first 15 of these, so added a SetMaxResults to
this, but at this point NHiberante falls over.

            //criteria.SetMaxResults(15); // This line causes the
query to break :-(

This causes:
System.Data.SqlClient.SqlException : The column 'articleid' was
specified multiple times for 'query'.
The column 'articleid' was specified multiple times for 'page'.



Any ideas how to fix this?
--~--~---------~--~----~------------~-------~--~----~
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