[eluser]Spir[/eluser]
[quote author="OverZealous" date="1273782934"]
@Spir
What are you trying to accomplish? You've said what you've done, but not what the goal is.[/quote]I'm actually trying to filter on the relationship between object1 and object2.
Object1 has many Object2. I'm trying to get Object1's object2, and I only want to get specifi object2 that meet the filter I've set in get_where.
Also I could have done this:
Code:
$o1 = new Object1(123); // passing id
$o2 = new Object2();
$o2->where('field', $some_value);
$o2->where('object1_id', $o1->id)->get();
I would prefer to have a few line. And was thinking about this:
Code:
$object1 = new Object1(123);
$object1->object2->get_where(('field'=>'value'))