philippe van dyck wrote:
But, correct me if I am wrong, that is what you are doing right now...
In UnitOfWorkInstance, you iterate the potential models and call "getEntity" each time :

for (int i = 0; i < potentialModules.size(); i++) {
ModuleInstance potentialModule = potentialModules.get(i);
EntityStore store = potentialModule.entities()
.entityStore();
EntityStoreUnitOfWork storeUow = getEntityStoreUnitOfWork(
store, potentialModule);
try {
entityState = storeUow.getEntityState(identity);
} catch (EntityNotFoundException e) {
continue;
}
....

I am missing something, obviously...

I am iterating over the *modules*, not *models. If you have several EntityStores (unlikely but possible), the UoW needs to find out which one has the given entity. Once the EntityStore has been found, then again, there's no way for it to know which EntityModel the Entity id maps to. Sometimes yes, but not in the general case.

/Rickard


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to