satyan/sugar — pull request #183 by Namvt (2014-11-04 09:23:29+00:00)
Title: Add SugarCache in Eager Load

Currently it's taking too much query from the application itself. It happens in other places as well when there is association.
- So I add SugarCache Object
- Using code below:
SugarRecord entity = SugarCache.getEntity((Class>) f.getType(), entities.get(f));
if (entity == null) {
entity = findById((Class>) f.getType(), entities.get(f));
SugarCache.addEntity(entity);
}
f.set(this, entity);
instead of
f.set(this, findById((Class>) f.getType(), entities.get(f)));
when inflate sugarrecord