fuel / orm

Fuel PHP Framework - Fuel v1.x ORM
http://fuelphp.com/docs/packages/orm/intro.html
152 stars 96 forks source link

Support relations select condition. #371

Closed n0ts closed 9 years ago

n0ts commented 9 years ago

Support like this.

$post = Model_Post::query() ->related('articles', array('select' => array('article_id', 'active', 'published'))) ->where('articles.user.active', '=', 1) ->order_by('articles.published', 'desc') ->get_one();

emlynwest commented 9 years ago

I don't think this should be merged, it encourages partial selects that are known to have confusing side effects with the current orm's cache.

n0ts commented 9 years ago

@stevewest Thanks for your comment. Sorry I don't think about orm's model cache. Thanks.