How do I get this to work?
$stuff = ORM::factory('mytable')
->with('user')
->with('other_stuff')
->find_all();
I've got all of my relationships set up and everything seems to be working when I do other queries. However, in the query above it is not joining table users to mytable. I think it may be because there can be many users for one mytable.
In the reference there is a method called join()
which I think I might need to use here, but they don't give any information on it, and the stuff I've searched for on here does not work.
When I try to use join
instead of with
, it tries to join the table, but it doesn't include any "join on" information, just gives an empty ()
.
I know my ORM DB relationships are all set up correctly, so I'm a bit baffled.