Hi Jacopo,

I implement your suggest on the issue https://issues.apache.org/jira/browse/OFBIZ-9447.

I'm available for any comment :)

Nicolas


Le 03/07/2017 à 23:27, Nicolas Malin a écrit :
Hi
Most entity definitions have about 1-4 fields in the primary key: as a
consequence the above API would require to maintain a reference to the map and then fetch from the entity definition the field names that compose the
primary key and perform 1-4 map lookups. This should not impact the
performance in a measurable way. However, only tests will tell!
Some design details: the where(Map) method should only save a reference to the map; the actual map lookup with primary key fields should be performed
later by the findOne() method.
Hmmm, maybe a subtely escape me because the where(Map) function call an EntityCondition to prepare the whereEntityCondition.
So I have two solutions :
* not follow your suggest and prepare the Map on the fly for the EntityCondition (it was my first idea) * add a new variable EntityQuery.searchContext to store the link as you suggest and change all query function to create the whereentityCondition or parse if it's the queryOne.

I implemented with success the first, now I will try to implement the second and I will present the result
Cheers,
Nicolas

Regards,

Jacopo




Reply via email to