0
어쩌면 나는 이것을 바보로 삼을 것이다. 그러나 propel로 내 데이터베이스에서 많은 결과를 얻고 싶다.Propel many-to-many join
저는 Acl_Customer, Acl_Group 및 Acl_Customer_Group 테이블을 보유하고 있습니다. 마지막은 고객과 그룹 간의 상호 참조입니다.
이제 그룹 테이블에 조인하여 내 acl 고객을 가져오고 싶을뿐입니다.
$customers = CustomerQuery::create()
->joinCustomerGroup()
->paginate($page, $limit);
return $customers->getResults()->getData();
이 다음 날 제공 :
[{"id":1,"username":"foo","email":"[email protected]","groups":[{"name":"developer"}, ...]}]
누구나 아이디어를 가지고 :
[{"id":1,"username":"foo","email":"[email protected]"}]
그러나 나는 이런 식으로 뭔가를해야합니까?