I would like to see your example that gets the data from 4-5 tables :)

On May 4, 7:49 am, Andrei Mita <[email protected]> wrote:
> I'm having a hard time understanding your problem, probably it's just me,
> I'm not having a good time at work.
>
> So, if you have 4 tables all linked together (it doesn't matter if Shop
> links to User through Merchant), than my guess is that Containable would be
> the quickest way to get the data you want from all 4 tables.
>
> As I said in a previous e-mail. Do you know what you get if you do a
> find('all') with $recursive = 2? How much of that information you don't
> need.
>
> I can help you in two ways: either you give me the table structures and an
> example of what you want OR i can post a containable query from one of my
> projects that gets data from 4-5 different tables, as an example.
>
>
>
> On Tue, May 4, 2010 at 2:06 PM, Kei Simone <[email protected]> wrote:
> > i have the following for my cake 1.3:
>
> > User hasOne Merchant (so Merchant belongsTo User)
> > Shop hasMany Merchant (so Merchant belongsTo Shop as well.)
> > Shop hasMany Domain (so Domain belongsTo Shop.)
>
> > i need to use Merchant model to do a find of all 4 related data.
>
> > i need to find the first datarow that matches conditions for Merchant,
> > User and Domain.
>
> > Merchant.owner = 1
> > User.email = [email protected]
> > Domain.domain =http://abc.example.com
> > Domain.primary = 1
>
> > the datarow must contain data from all 4 models.
>
> > the find must be done inside the Merchant model. as in $this->find...
>
> > Love to hear more from you about Containable. Really interested to see
> > how powerful Containable is.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

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 [email protected]
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