Re: Change the File Name for a Model
You are rite! thanks! On Aug 16, 8:15 pm, Miles J wrote: > Why are you using App::import()? Just use the ole regular > include_once. > > On Aug 14, 3:13 pm, sanedevil wrote: > > > Thanks again guys! > > > @AD7six, i checked the app::import, but couldn't figure out a way that > > will help me. can u pls enlighten me? > > > On Aug 13, 4:31 pm, AD7six wrote: > > > > On Aug 13, 4:19 pm, sanedevil wrote: > > > > > Thanks all guys! > > > > > seems i cant achieve what i want. I'll change the class name and make > > > > the changes elsewhere in the app. > > > > > as a sidenote (and a general query), cake stresses on convention over > > > > configuration, but doesn't it provide configuration for the desperate > > > > and crazy cases (like me ;-) )? > > > > Ps if your model class is named Con *only* because the db table is > > > named cons - then just useTable your way out of that paper bag. > > > > Pps - filenames should be lower case. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
On Aug 15, 12:13 am, sanedevil wrote: > Thanks again guys! > > @AD7six, i checked the app::import, but couldn't figure out a way that > will help me. can u pls enlighten me? sure use the "sane" path: useTable ;) 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
Why are you using App::import()? Just use the ole regular include_once. On Aug 14, 3:13 pm, sanedevil wrote: > Thanks again guys! > > @AD7six, i checked the app::import, but couldn't figure out a way that > will help me. can u pls enlighten me? > > On Aug 13, 4:31 pm, AD7six wrote: > > > On Aug 13, 4:19 pm, sanedevil wrote: > > > > Thanks all guys! > > > > seems i cant achieve what i want. I'll change the class name and make > > > the changes elsewhere in the app. > > > > as a sidenote (and a general query), cake stresses on convention over > > > configuration, but doesn't it provide configuration for the desperate > > > and crazy cases (like me ;-) )? > > > Ps if your model class is named Con *only* because the db table is > > named cons - then just useTable your way out of that paper bag. > > > Pps - filenames should be lower case. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
Thanks again guys! @AD7six, i checked the app::import, but couldn't figure out a way that will help me. can u pls enlighten me? On Aug 13, 4:31 pm, AD7six wrote: > On Aug 13, 4:19 pm, sanedevil wrote: > > > Thanks all guys! > > > seems i cant achieve what i want. I'll change the class name and make > > the changes elsewhere in the app. > > > as a sidenote (and a general query), cake stresses on convention over > > configuration, but doesn't it provide configuration for the desperate > > and crazy cases (like me ;-) )? > > Ps if your model class is named Con *only* because the db table is > named cons - then just useTable your way out of that paper bag. > > Pps - filenames should be lower case. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
On Aug 13, 4:19 pm, sanedevil wrote: > Thanks all guys! > > seems i cant achieve what i want. I'll change the class name and make > the changes elsewhere in the app. > > as a sidenote (and a general query), cake stresses on convention over > configuration, but doesn't it provide configuration for the desperate > and crazy cases (like me ;-) )? Ps if your model class is named Con *only* because the db table is named cons - then just useTable your way out of that paper bag. Pps - filenames should be lower case. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
On Aug 13, 4:19 pm, sanedevil wrote: > Thanks all guys! > > seems i cant achieve what i want. I'll change the class name and make > the changes elsewhere in the app. > > as a sidenote (and a general query), cake stresses on convention over > configuration, but doesn't it provide configuration for the desperate > and crazy cases (like me ;-) )? I'd suggest you've got 2 choices if you want a class/file named Con: 1) don't use windows 2) just include (whatever name you like, contains class Con.php) yourself. See the docs on app import for loading unconventional classes. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
Thanks all guys! seems i cant achieve what i want. I'll change the class name and make the changes elsewhere in the app. as a sidenote (and a general query), cake stresses on convention over configuration, but doesn't it provide configuration for the desperate and crazy cases (like me ;-) )? On Aug 13, 10:03 am, euromark wrote: > that's what i was wondering :) > > On 13 Aug., 09:31, AD7six wrote: > > > > > On Aug 13, 12:03 am, sanedevil wrote: > > > > Table name: cons > > > Class name: Con > > > File name: Con.php > > > > However, windows doesn't allow you to create a file named "Con". Is > > > there a way that I can change the filename (e.g. Contact.php), but > > > still keep the Classname as Con? > > > > Thanks! > > > An odd windows "problem" > > > But why do you want to give a model a name that doesn't mean anything?- > > Hide quoted text - > > - Show quoted text - 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
that's what i was wondering :) On 13 Aug., 09:31, AD7six wrote: > On Aug 13, 12:03 am, sanedevil wrote: > > > Table name: cons > > Class name: Con > > File name: Con.php > > > However, windows doesn't allow you to create a file named "Con". Is > > there a way that I can change the filename (e.g. Contact.php), but > > still keep the Classname as Con? > > > Thanks! > > An odd windows "problem" > > But why do you want to give a model a name that doesn't mean anything? 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
On Aug 13, 12:03 am, sanedevil wrote: > Table name: cons > Class name: Con > File name: Con.php > > However, windows doesn't allow you to create a file named "Con". Is > there a way that I can change the filename (e.g. Contact.php), but > still keep the Classname as Con? > > Thanks! An odd windows "problem" But why do you want to give a model a name that doesn't mean anything? 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
I looked it up- there are about 20 reserved words that you can't use in windows file/folder name... throwbacks from the old dos days: http://ionicflux.wordpress.com/2006/09/02/windows-reserved-words/ On Aug 12, 7:31 pm, cricket wrote: > On Thu, Aug 12, 2010 at 8:23 PM, Miles J wrote: > > Erm I mean $useTable. > > >http://book.cakephp.org/view/1057/Model-Attributes#useTable-1059 > > Yes, that should work. Then, switch to Linux. :-) That's just utterly > bizarre that Windows won't let you name something con (+ extension). I > wonder which bandaid solution that stems from. Just weird as all > get-out. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
On Thu, Aug 12, 2010 at 8:23 PM, Miles J wrote: > Erm I mean $useTable. > > http://book.cakephp.org/view/1057/Model-Attributes#useTable-1059 Yes, that should work. Then, switch to Linux. :-) That's just utterly bizarre that Windows won't let you name something con (+ extension). I wonder which bandaid solution that stems from. Just weird as all get-out. 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
Erm I mean $useTable. http://book.cakephp.org/view/1057/Model-Attributes#useTable-1059 On Aug 12, 4:35 pm, Sam wrote: > How many places in the application already use the "Con" class name? > Is there any way to change the table name? If not you can use > "contact" for everything else(using $useTable = 'Con') and just > document the irregularity. > > On Aug 12, 5:33 pm, sanedevil wrote: > > > And i thot it would be something simple. Damn it! > > > thanks euromark! the table's already called Con and hence want to keep > > the name consistent throughout the app to avoid the typical issues > > that a softie faces :) You can imagine the nightmare when I start > > using two names in the app. I really hope theres a way out. > > > On Aug 13, 12:14 am, euromark wrote: > > > > WOW didnt know that.. crazy :) > > > > this would not be very straight forward. maybe with manual includes > > > and stuff > > > but why not naming it Contact and contact.php? > > > > On 13 Aug., 00:03, sanedevil wrote: > > > > > Table name: cons > > > > Class name: Con > > > > File name: Con.php > > > > > However, windows doesn't allow you to create a file named "Con". Is > > > > there a way that I can change the filename (e.g. Contact.php), but > > > > still keep the Classname as Con? > > > > > Thanks! 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
Create the model Contact. Just change the property $useDbTable = 'con'; On Aug 12, 4:35 pm, Sam wrote: > How many places in the application already use the "Con" class name? > Is there any way to change the table name? If not you can use > "contact" for everything else(using $useTable = 'Con') and just > document the irregularity. > > On Aug 12, 5:33 pm, sanedevil wrote: > > > And i thot it would be something simple. Damn it! > > > thanks euromark! the table's already called Con and hence want to keep > > the name consistent throughout the app to avoid the typical issues > > that a softie faces :) You can imagine the nightmare when I start > > using two names in the app. I really hope theres a way out. > > > On Aug 13, 12:14 am, euromark wrote: > > > > WOW didnt know that.. crazy :) > > > > this would not be very straight forward. maybe with manual includes > > > and stuff > > > but why not naming it Contact and contact.php? > > > > On 13 Aug., 00:03, sanedevil wrote: > > > > > Table name: cons > > > > Class name: Con > > > > File name: Con.php > > > > > However, windows doesn't allow you to create a file named "Con". Is > > > > there a way that I can change the filename (e.g. Contact.php), but > > > > still keep the Classname as Con? > > > > > Thanks! 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
How many places in the application already use the "Con" class name? Is there any way to change the table name? If not you can use "contact" for everything else(using $useTable = 'Con') and just document the irregularity. On Aug 12, 5:33 pm, sanedevil wrote: > And i thot it would be something simple. Damn it! > > thanks euromark! the table's already called Con and hence want to keep > the name consistent throughout the app to avoid the typical issues > that a softie faces :) You can imagine the nightmare when I start > using two names in the app. I really hope theres a way out. > > On Aug 13, 12:14 am, euromark wrote: > > > > > WOW didnt know that.. crazy :) > > > this would not be very straight forward. maybe with manual includes > > and stuff > > but why not naming it Contact and contact.php? > > > On 13 Aug., 00:03, sanedevil wrote: > > > > Table name: cons > > > Class name: Con > > > File name: Con.php > > > > However, windows doesn't allow you to create a file named "Con". Is > > > there a way that I can change the filename (e.g. Contact.php), but > > > still keep the Classname as Con? > > > > Thanks! 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
And i thot it would be something simple. Damn it! thanks euromark! the table's already called Con and hence want to keep the name consistent throughout the app to avoid the typical issues that a softie faces :) You can imagine the nightmare when I start using two names in the app. I really hope theres a way out. On Aug 13, 12:14 am, euromark wrote: > WOW didnt know that.. crazy :) > > this would not be very straight forward. maybe with manual includes > and stuff > but why not naming it Contact and contact.php? > > On 13 Aug., 00:03, sanedevil wrote: > > > Table name: cons > > Class name: Con > > File name: Con.php > > > However, windows doesn't allow you to create a file named "Con". Is > > there a way that I can change the filename (e.g. Contact.php), but > > still keep the Classname as Con? > > > Thanks! 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Change the File Name for a Model
WOW didnt know that.. crazy :) this would not be very straight forward. maybe with manual includes and stuff but why not naming it Contact and contact.php? On 13 Aug., 00:03, sanedevil wrote: > Table name: cons > Class name: Con > File name: Con.php > > However, windows doesn't allow you to create a file named "Con". Is > there a way that I can change the filename (e.g. Contact.php), but > still keep the Classname as Con? > > Thanks! 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Change the File Name for a Model
Table name: cons Class name: Con File name: Con.php However, windows doesn't allow you to create a file named "Con". Is there a way that I can change the filename (e.g. Contact.php), but still keep the Classname as Con? Thanks! 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en