omar wrote:
you have to use FetchNewEntity, which accepts a filter, and produce teh filter with a factory.
Two senarios:
1- If the UI programmer creates an EntitCollection and then requests the BL to fill it from the DB, how can I automate the inclusion of a filter bucket whenever the EntitCollection calls the entitie's factory to create a new object of this entity
The fetch as you describe it should get a filter created by the BL code, if I understand the scenario correctly.
Though that's not transparent, admitted. What you want if I understand it correctly, is that when you fetch an entity of type E, a filter for the PK should be used (which is the current situation) PLUS a filter supplied by a factory, transparently, or when you fetch them in bulk, there should always be a filter applied on a given set of fields besides the supplied filter.
Is that a good description?
So in fact you want to define an entity collection as a collection which isn't generic, it's a container for a special set of objects, defined by the filter factory added to the collection.
2- In my BL's derived entity class, I want a filter bucket factory to automatically include its filter bucket for every fetch operation for that entity.
The nice thing about ConcurrencyPredicateFactoryToUse is that its consulted AUTOMATICALLY at save without me having to worry about how I am saving the object. If there was a FetchPredicateFactoryToUse then that would act the same when FETCHING the object from the DB.
I'll add it to the todo for the may release. I think it will be obsolete by then due to the implementation of inheritance/multi-table mapping, but we'll see