Reputation: 43
3 tables:
PaymentRequests
PaymentPurchaseOrders
PurchaseOrders
Current Relationship:
PaymentRequests -> HasMany -> PaymentPurchaseOrders -> BelongsTo ->PurchaseOrders
Current Codes on Controller:
$Get = $this->PaymentRequests->find(
'all', [
'contain'=>['PaymentPurchaseOrder'=>['PurchaseOrder']
]);
Problem:
This is too heavy a query. I want to just associate this in model but i do not know how.
Upvotes: 0
Views: 47