Wednesday, September 22, 2010

Re: hasOne relation with external database table

I had similar problem and if I remember correctly I solved it via
afterFind callback.
All you need to do is to overload afterFind method in T1, it should
make find in T3 table (with conditions T1.id = needed_id) and merge
data with results.
At least this solutions works for me.

Regards,
Miro


On 21 Wrz, 17:11, emmexx <emmeics...@gmail.com> wrote:
> On 12 Set, 10:13, emmexx <emmeics...@gmail.com> wrote:
>
> > find('all') now gives no result.
>
> > Is this the expected behaviour? There are limitations when relating
> > models that belong to different dbs?
> > I'm using cakephp 1.2.6.
>
> Searching better in the Google archives I found out this thread:
>
> http://groups.google.com/group/cake-php/browse_thread/thread/b542cf43...
>
> Short answer: it is not possible to join 2 models in different
> databases.
>
>     maxx

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: