model name collision in plugin

2010-03-11 Thread anler
hi folks, I have a model in a plugin called Section, but also have a
model in the app with the same name, the problem strikes when I try to
do the following from a helper:

ClassRegistry::init('Plugin.Section')

I'm getting the App Section model instead of the plugin model

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: model name collision in plugin

2010-03-11 Thread John Andersen
According to the CakePHP book at
http://book.cakephp.org/view/117/Plugin-Models
you should name your model in the plugin by prefixing it with the
plugin name.
Take a look and hope this helps you on the way,
   John

On Mar 11, 3:33 pm, anler anle...@gmail.com wrote:
 hi folks, I have a model in a plugin called Section, but also have a
 model in the app with the same name, the problem strikes when I try to
 do the following from a helper:

 ClassRegistry::init('Plugin.Section')

 I'm getting the App Section model instead of the plugin model

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: model name collision in plugin

2010-03-11 Thread anl hp
you're right, I read the book but I forgot almost everything about naming
conventions, thanks a lot


--
anl


On Thu, Mar 11, 2010 at 8:34 PM, John Andersen j.andersen...@gmail.comwrote:

 According to the CakePHP book at
 http://book.cakephp.org/view/117/Plugin-Models
 you should name your model in the plugin by prefixing it with the
 plugin name.
 Take a look and hope this helps you on the way,
John

 On Mar 11, 3:33 pm, anler anle...@gmail.com wrote:
  hi folks, I have a model in a plugin called Section, but also have a
  model in the app with the same name, the problem strikes when I try to
  do the following from a helper:
 
  ClassRegistry::init('Plugin.Section')
 
  I'm getting the App Section model instead of the plugin model

 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


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