You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
m2o
product1.categ_id should 1st load ProductCategory proxy with just the name (default to the rec_name read) and the id. And it should hit the server and request all other lazy fields only if other fields are asked.
x2m
for x2m, a CollectionProxy should mimic only a collections with the id attribute and should lazily hit OpenERP to retrieve all other fast fields of all the collection if any other field is asked.
The text was updated successfully, but these errors were encountered:
for o2m associations, an idea could be that in relation.rb, in method_missing, when we have the method, of an Array (:each), with a Proc passed, then we could may be call to_a with a special option so that when it will do the find upon the specified ids scope, it just build the proxies with just their id and the lazy flag on without hitting OpenERP yet.
Then when the first accessor will be called upon the first item, we should be able to figure out that this lazy proxy belongs to some owner object with a collection association.
So we should reload all the proxies of the collection all together in a single call to OpenERP.
Additionally, this gives us the opportunity to inject the requested field along with the "fast_fields" to eager load them in the single request.
That would be interesting to know if we could collect all the accessors called upon the collection items within the block and request them altogether.
It's worth looking f other ORM are able to introspect somewhat the iteration block or able to collect all the requests fields.
For instance Datamapper says it fixes the N+1 problem in "Strategic Eager Loading" http://datamapper.org/why.html
are they just eager loading a list of fields or are them doing something smarter?
m2o
product1.categ_id should 1st load ProductCategory proxy with just the name (default to the rec_name read) and the id. And it should hit the server and request all other lazy fields only if other fields are asked.
x2m
for x2m, a CollectionProxy should mimic only a collections with the id attribute and should lazily hit OpenERP to retrieve all other fast fields of all the collection if any other field is asked.
The text was updated successfully, but these errors were encountered: