CakePHP HABTM Plugin table naming conventions (for 1.3)

Posted by Parris on Stack Overflow See other posts from Stack Overflow or by Parris
Published on 2010-01-11T20:43:50Z Indexed on 2010/05/17 7:30 UTC
Read the original article Hit count: 266

Hi everyone,
I know naming conventions for tables used by plugins generally start with the name of the plugin and then the model pluralized. For example lets say I had a plugin called Poll, with a model also called PollPoll and another model called PollTag then the resulting table names would be poll_polls and poll_tags. They would also have a habtm relationship so what is the convention for that table name? I believe it would poll_poll_polls_poll_tags, although it is a little redundant it makes sense since the first poll_ represents the name of the plugin, while poll_polls and poll_tags relates to the models.

Also have any naming conventions changed for plugins in 1.3? Is the above stated correct? Thanks!

© Stack Overflow or respective owner

Related posts about cakephp-1.3

Related posts about naming-conventions