Subject: How can we filter relatioships in lazy loading mode ?
Hi,
how can we filter relationships in lazy loading mode ?
EX:
$u = User::first();
var_dump($u->posts);
// this prints all the posts, but if i want only some posts like the 10 first, how do i do ?
// something like this exists ? (below)
$u->where_relation('posts', array('conditions' => 'WHERE ....', 'limit' => 10)),
anyone knows ?
thanks
June 27 2010
February 28, 2013
Subject: How can we filter relatioships in lazy loading mode ?
Hi,
how can we filter relationships in lazy loading mode ?
EX:
$u = User::first();
var_dump($u->posts);
// this prints all the posts, but if i want only some posts like the 10 first, how do i do ?
// something like this exists ? (below)
$u->where_relation('posts', array('conditions' => 'WHERE ....', 'limit' => 10)),
anyone knows ?
thanks