@snowfall and @necken, there was a discussion about eager load with ‘all’ method issue previously. Try this patch class : https://gist.github.com/4023670 (replace your core.php under third_party/gas/classes/core.php with those patch). Let me know if you two, still have any issues with eager loading afterward.
@jonahdahlquist, If you need self-referencing to some entity, you actually could do it without adding more complexity within your model definition. How? Just write something like :
/**
* Method for fetching child categories
*
* @return array
*/
public function category()
{
return self::find_by_parent_category_id($this->id);
}
/**
* Method for fetching parent category
*
* @return object
*/
public function parent()
{
return self::find($this->parent_category_id);
}As for your request regarding additional query for child entities, there is no support for ‘where’ or other clause than ‘select’, ‘limit’, and ‘order_by’ for version 2.x.x. Maybe for the next major version.