LOL shirt is on.
Everything is baked 100% controllers /models / view. It bakes all controller and models fine no issues. Only when it comes to the views, if the table is underscored_name, not a join or relationship table, just a multi_word_name_with_underscores it looks for joining models and I get the error saying Model not found. From: [email protected] [mailto:[email protected]] On Behalf Of Greg Skerman Sent: Friday, July 13, 2012 10:20 AM To: [email protected] Subject: Re: Naming Conventions keep your shirt on, we're trying to help. its a little hard without seeing the code. i.e. if we had the code we could try and bake it out on our machines and debug it at this end for you. did you use cake bake controller when you baked the controller? from memory, it'll build the controller as a scaffold if you do that (i.e. non interactive baking), and I think last time i did that it struggled to bake the views (i guess no controller methods to introspect) if so, try: cake bake controller --public FavoritePosts which will bake the concrete FavoritePosts methods... then try giving the view another go. On Fri, Jul 13, 2012 at 10:20 PM, Advantage+ <[email protected]> wrote: It's the same db I used with 1.3.x and it baked everything fine. I am now trying to do the same site in 2.1.x but it will not bake the views for multi_word (single table) named, anything with an underscore cake is thinking joined relationship tables. (No double plural naming for joined names either) favorite_posts not favorites_posts ITS BAKES THE CONTROLLER AND MODEL IT'S ONLY THE VIEW IT SAYS IS MISSING THE MODEL..... -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mike Griffin Sent: Friday, July 13, 2012 7:13 AM To: [email protected] Subject: Re: Naming Conventions On Fri, Jul 13, 2012 at 10:24 AM, Greg Skerman <[email protected]> wrote: > yeah i'm an all bake, all the time kinda guy. For most of the tools I > write it works beautifully, because business systems tend to be based > around CRUD > - so maybe half my time is spent mapping a schema, then a bit of time > mucking around in the scaffold, then build concrete classes and spend > the rest of my time writing the small bits of business logic required > and making it look nice/doing javascript bits etc. > > I'm the stereotypical lazy programmer :P No harm in that :) > Heres an example. Current tool is a job number application form. It > has 3 tables, applications, application_questions, application_answers > > running up the console right now, i get: > > Possible Models based on your current database: > 1. Application > 2. ApplicationQuestion > 3. ApplicationAnswer > Enter a number from the list above, > type in the name of another model, or 'q' to exit [q] > > > had to do it to prove it to myself (It is Friday afternoon afterall, > and I am liable to say stupid things) - but yeah, seems that it copes > with underscores correctly - the baked models are not join tables, and > the structure is Application hasMany ApplicationQuestion hasMany > ApplicationAnswer, which is precisely what I expect it to be (no HABTM > in sight). That's cleared that up for me. I had never tried it out, it was just a hunch that occured to me when I read it again. > so either theres a problem with OP's schema, or possibly a custom > inflection rule which is seeing "favorite" as plural, or I have no idea.... Kersacly. Mike. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] <mailto:cake-php%[email protected]> For more options, visit this group cake-php+at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] <mailto:cake-php%[email protected]> For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
