Hi Paul On 16 February 2011 14:51, paul_rogers6 <[email protected]> wrote:
> Secondly, if I have a table called address_types and a table called > address_line_types is my join table have the name > address_line_types_address_types? It seems a bit long winded!! Is it > acceptable to call my class for the line types AddressLinetypes and > the table address_linetypes? Or will this cause problems for Cake? > This is a little bit long winded, it is good practise to label your tables in such a way but it isn't a requirement, its main purpose I like to believe is so that if anybody else views your code/db they can understand the associations without doing research. Let's say if I was working with the model "User" and the table "users". User has One Profile. I would normally label Profile "Profile" instead of "UserProfile" because my app is user orientated and most of my tables would relate to the user. If it was a table used to hold images I would use "UserImages" or "ProfileImages" This may not be the cake way, but sometimes it can become long winded, and this is my way around. In your case I would use AddressLineType and AddressType because it doesn't make much sense without the "Address" in it, and "Type" could be confused with other things. My 2 cents, but not necessarily correct. -- Kind Regards Stephen @ NinjaCoderMonkey www.ninjacodermonkey.co.uk -- 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
