Friday, September 12, 2014

Re: Model chaining for a find statement not returning expected results

No problem Paul

The dogmatic69 website seems like a good resource, plural tables, singular foreign keys (underscored followed by _id) and usually a good idea to add created DATETIME and modified DATETIME to each table (with the exception of hasAndBelongsToMany etc)

Hopefully this will work out for you, you can test your data in blank controllers by adding public $scaffold which gives you automatic CRUD for testing data and relationships, if you didn't want to rewrite or bake some queries.

On 12 September 2014 08:54, Paul Drage <eswoosh.limited@gmail.com> wrote:
Thanks Stephen    I did a cake bake all (auto) which generated all the models- in hindsight perhaps manually coding them would have been an advantage?    I used dogmatic69(.com) yesterday and it told me there was about 3 tables which were named incorrectly: it would of been nice for cake bake to tell me before I even started: so I will rename tables and rebake a couple of the models to see if that helps before I get down and dirty with modifying the belongsTo etc    Cheers

--
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.



--
Kind Regards
 Stephen Speakman

--
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: