【发布时间】:2015-07-08 09:03:31
【问题描述】:
$contract = ORM::factory('Contract', 1);
我可以得到这样的托运人:$contract->shipper;
我可以得到这样的所有者:$contract->owners->find_all();
但是我不能用
$contract->owners and preload them like ORM::factory('Contract', 1)->with("owners");
那么我为什么需要这个,我无法理解它的作用以及它是如何工作的?
【问题讨论】:
-
我不知道您为什么要这样做,但是如何将
withAll()之类的方法添加到您迭代关系并调用->find_all()的ORM 中?