Ive now found out that Nhibernate does not trigger OnPostUpdate if only items in the collection has been updated (and not the main object). Ive fixed this so i automaticlly sets a date on MyObject (needed it for the domain anyway so its no big deal). But there stills no info about MyOtherObjects.Name.
Regards! Erik On 26 Maj, 22:37, Jea <[email protected]> wrote: > I can’t seem to find a solution on a problem I have with Nhibernate > Search and Lucene. Basically I want to be able to search a collection > (many-to-many) on an object, but the collection does not seem to get > indexed. I’ve checked with Luke. > > I’m only interested in doing searches on MyObject, but also queries > like MyOtherObjects.Name : Whatever. > > My domain looks something like this > > [Indexed] > public class MyObject > { > [IndexedEmbedded] > private readonly ISet<MyOtherObject> m_otherObjects; > > public IEnumerable< MyOtherObject > MyOtherObjects > { > get { return m_otherObjects; } > } > > [DocumentId] > public Guid Id { get; set; } > > [Field(Index.Tokenized, Store = Store.Yes)] > public string Name { get; set; > } > > public class MyOtherObject > { > private readonly ISet< MyObject > m_myobjects; > > public IEnumerable< MyObject > MyObjects > { > get { return m_ myobjects; } > } > > public Guid Id { get; set; } > > [Field(Index.Tokenized, Store = Store.Yes)] > public string Name { get; set; > } > > But when I save a instance of MyObject all the info except the items > in my ISet<MyOtherObject>. Is it possible to do this kind of indexing? > Acording to Ayende it seems to be > possible.http://ayende.com/Blog/archive/2009/05/03/nhibernate-search-again.aspx > > Have a nice day! > > Regards > Erik --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
