nhibernate search, update collection

115 views Asked by At

I have a relationship between a Supplier and a Features collection. A Supplier HasMany Features. If the Supplier is updated, I need the Features collection to be updated when a Supplier is updated because the Supplier is [IndexEmbedded] in the Feature class.

I cannot however place the [ContainedIn] attribute on the Features collection because not all features belong to a Supplier. Any ideas please?

1

There are 1 answers

0
Paul On BEST ANSWER

Fixed it myself.

I added the containedin attribute to the Features collection and then did another separate query to retrieve all the features which did not belong to a supplier and then indexed them.