Model Subject not found
Dear Bakers, I'm trying to move a application from Symfony to CakePHP, getting tired of the way symfony always seems to be getting in the way instead of helping me out to do stuff quickly. Of course, I read the docs etc, and now I am trying my first baby-steps in Cake. I have a existing database, which of course comes from the symfony-version of my app. Now, I am trying to bake the CRUD for the database, just to see if things can work out without too much changes. I ran php bake model all php bake controller all without much trouble, and magic appears to be happening. But with bake view all, I hit a snag: Error: Table subjects for model Subject was not found in datasource default. The strange thing is: I have no Subject model (as far as I can see..) I sure don't have a table called subject, I don't even have a field called subject. Why is cake thinking I want a subject? I don't want a subject! :-))) My question: how can I find out where this Subject is comming from? BTW: I used the cake oAuth-app as groundwork for this app, as I want to use oAuth. thanks for any light on this :) Paul -- 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+unsubscr...@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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Model Subject not found
Hi Thiago, Maybe a search for Subject on files in your app folder? thanks for your answer. Of course, my initial reaction was: I did, but I don't find anything! And I did a grep Subject * -R. But I looked over the results once more. Turns out, I did have a field called subject_id. The funny thing is: symfony does not care about the _id part, but I guess CakePHP thinks, because of the _id, that this must be a reference to another table, which does, indeed, not exist. So, I changed the fieldname - now, the views are generated by bake without any problems. Thanks again for pointing me in the right direction! regards, Paul -- 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+unsubscr...@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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.