Wow and double wow ... I'll buy you a very large beer if you can let  
us use NHSearch with NH 2.1. :)

Casey

On 17 Oct 2008, at 20:59, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:

> I am back to working on NH Search this weekend, hopefully I'll be  
> able to do a syncup of everything.
>
> 2008/10/17 Tuna Toksöz <[EMAIL PROTECTED]>
> Now ... any idea on when NH, NHSearch, Lucene, Castle, and Rhino
> Commons will all play nicely together again????
>
> Lucene is not very actively developed, i think, Lucene and NHSearch  
> will play well.
> In case of castle, I don't know why it doesn't maybe because it is  
> built against 2.0 but it shouldn't take long to build against trunk  
> etc.
> Rhino targets trunk of nh, AFAIK
>
>
> On Fri, Oct 17, 2008 at 8:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED] 
> > wrote:
>
> Tuna came up with the following HQL which works ...
>
> IList result = sess.CreateQuery("from Article a join a.TagList tag
> join a.NewsGroupList newsGroup where tag.Title in (:tagtitle) or
> newsGroup.Title in (:grouptitle) order by a.Date")
> .SetParameterList("tagtitle", tagTitles)
> .SetParameterList("grouptitle",
> newsGroupTitles).SetMaxResults(15).List();
>
> If anyone can figure out how to get it working via criterias I would
> be grateful, but this will do as a less elegant solution for now ....
>
>
> Thanks once again Tuna!!!!
>
>
> Now ... any idea on when NH, NHSearch, Lucene, Castle, and Rhino
> Commons will all play nicely together again????
>
>
>
>
>
> On Oct 17, 4:17 pm, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote:
> > Or maybe creating a patch from the last revision and apply it onto  
> the
> > version he is using, then compile.
> >
> > 2008/10/17 Ayende Rahien <[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> > > Take the current MsSQL 2005 dialect, compile that as a separate  
> assembly,
> > > and use.
> > > It should fix the issue, and has no deps on anything else.
> >
> > > 2008/10/17 [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> >
> > >> OK - nope that alternative is bunkum and doesnt work ... any  
> other
> > >> ideas anyone?
> >
> > >> On Oct 17, 11:28 am, "[EMAIL PROTECTED]"  
> <[EMAIL PROTECTED]>
> > >> wrote:
> > >> > Oh crud .... typical!!!!!!
> >
> > >> > Nope we can't test ... cos we are having to use an old build  
> of NH,
> > >> > because we are using an old build of NH Search, cos we are  
> using
> > >> > Lucene (all of which is in itself a nightmare!!!!)    (anyone  
> got any
> > >> > idea when NH Search/Lucene/NH will be in synch again?)
> >
> > >> > I was just playing around and came up with this  
> alternative ... any
> > >> > ideas if it is better/worse/indifferent?  Seems to work ok  
> (from quick
> > >> > test) ....
> >
> > >> > var newsGroupTitles = new[] { "Steel News" };
> > >> > var tagTitles = new[] { "Asia" };
> >
> > >> > var tags = DetachedCriteria.For<Tag>()
> > >> > .Add(Property.ForName("Title").In(tagTitles))
> > >> > .SetProjection(Projections.Id());
> >
> > >> > var ngs = DetachedCriteria.For<NewsGroup>()
> > >> > .Add(Property.ForName("Title").In(newsGroupTitles))
> > >> > .SetProjection(Projections.Id());
> >
> > >> > var criteria = DetachedCriteria.For(typeof(Article), "article")
> > >> > .Add(Subqueries.Exists(tags))
> > >> > .Add(Subqueries.Exists(ngs));
> > >> > criteria.SetMaxResults(15);
> >
> > >> > var articles = ActiveRecordMediator<Article>.FindAll(criteria);
> > >> > Console.WriteLine(articles.Length);
> >
> > >> > On Oct 17, 11:09 am, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote:
> >
> > >> > > ı think this was fixewd 2 days ago. can you verify?
> >
> > >> > > On 10/17/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]>  
> wrote:
> >
> > >> > > > 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?
> >
> > >> > > --
> > >> > > Tuna Toksöz
> >
> > >> > > Typos included to enhance the readers attention!- Hide  
> quoted text -
> >
> > >> > > - Show quoted text -- Hide quoted text -
> >
> > >> > - Show quoted text -
> >
> > --
> > Tuna Toksöz
> >
> > Typos included to enhance the readers attention!- Hide quoted text -
> >
> > - Show quoted text -
>
>
>
>
> -- 
> Tuna Toksöz
>
> Typos included to enhance the readers attention!
>
>
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
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