Monday, August 4, 2014

Re: CakePHP3 - How to get the data od second level relation ship table.

Hi Mark,
Sorry for the delay due to the weekend off. The sql printed is as following
=========================================================
SELECT Companies.id AS `Companies__id`, Companies.company_name AS `Companies__company_name`, Companies.logo_url AS `Companies__logo_url`, Companies.email_domain AS `Companies__email_domain`, Companies.phone AS `Companies__phone`, Companies.fax AS `Companies__fax`, Companies.website AS `Companies__website`, Companies.address AS `Companies__address`, Companies.country AS `Companies__country`, Companies.city AS `Companies__city`, Companies.state AS `Companies__state`, Companies.postalcode AS `Companies__postalcode`, Companies.subscription_package AS `Companies__subscription_package`, Companies.status AS `Companies__status`, Companies.no_emails AS `Companies__no_emails`, Companies.no_partners AS `Companies__no_partners`, Companies.coupon_id AS `Companies__coupon_id`, Companies.language AS `Companies__language` FROM Companies AS Companies
======================

I couldn't find any joins happens in the query but it is trying to fetch the fields of joined tables as its own.

Regards,
Jipson


On Saturday, 2 August 2014 13:13:18 UTC+1, mark_story wrote:
What does the query that is being generated look like? You can use sql() on a query to get the sql that would be generated.

-mark

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: