Hello!
I'm pretty new to LLBLGen and I have a quistion on EntityCollection.OnEntityAdding.
I have overloaded the EntityCollection.OnEntityAdding method to check if entityToAdd implements a certain interface and then cancel the adding of the entity to the collection if a certain property has a certain value.
The goal is that some entities should never be retreived from the database whatever the method of retreiving them.
Now, when loading some entities with a prefetchpath like this:
prefetch.Add(MyFirstEntity.PrefetchPathMySecondEntity)
those of the MyFirstEntity entities having that certain property value will be filtered away as expected. But all of the MySecondEntity entities will be loaded, even though they the match all the criteria for beeing filtered away be the OnEntityAdding method.
It seems that the OnEntityAdding method does not kick in on the prefetch collection. Is this correct, and is there some other way to do it?
/Mikael