Tuesday, June 1, 2010

Re: Paginator, belongsTo and a model using data from an external DB

I'm hoping you've set the reverse relationships too?

Customer hasMany Order

But I think you may have to use the HABT relationship between
Shipments and orders.

On 31 May, 16:42, Ernesto <e.fanz...@gmail.com> wrote:
> hello.
>
> my app has 3 models:
>
> - Order belongsTo Shipment
> - Order belongsTo Customer
>
> Customer data is retrieved from an external DB (customers are shared
> across other non-php apps)
>
> i'm trying to paginate results from Order::index();
>
> when i order by Customer.name cake throws some SQL errors.
>
> i bet the external db is the culprit, because paginator isn't loading
> all data with one single query.
>
> what can i do to avoid this?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: