Thi is all ok.
But If  I have this situation:
Model A in DB A
Model B in DB B
Model A belongsTo Model B

I make  a find on Model A with a conditions on Model B.
In this case I get error .
How can I do in this case?
Many Thanks


On 8 Ott, 15:24, teknoid <[EMAIL PROTECTED]> wrote:
> The only problem with HABTM is that cake will expect your join table
> to be in the same DB as the "main" model.
> The easy work-around is to make a chain of hasMany/belongsTo in this
> case.
>
> On Oct 8, 9:07 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > David:
> > I can see how that would work for hasMany. But for hasOne, belongsTo
> > and (I think) HABTM Cake joins the tables to get the data in a single
> > query. Does Cake honor useDbConfig in these cases?
>
> > /Martin
>
> > On Oct 8, 1:08 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>
> > > Set up multipledatabaseconnections 
> > > indatabase.php.http://book.cakephp.org/view/40/Database-Configuration
>
> > > Configure your models to use the appropriate 
> > > connection.http://book.cakephp.org/view/435/useDbConfig
>
> > > The associations between models work exactly the same, no extra work
> > > needed.
>
> > > On 8 Oct 2008, at 17:06, [EMAIL PROTECTED] wrote:
>
> > > > Hi
> > > > I have read many posts about "How make associations between models on
> > > > differentdatabase"
> > > > but I have not yet understood how can I do this.
> > > > Can someone explain how I can do this for all type of associations (in
> > > > particular for HABTM)?
> > > > Many thanks
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to