A few things that look wrong:

var $name = 'User' in the model has to be renamed along with the class
and file.

var $belongsTo = array('Cms.Group') is linking to a Cms plugin while
the class and Controller is referring to Epicms

the plugin name, model/controller prefix class name prefix... all need
to be the same. Pick Cms or Epicms and use the for all if you want
things to communicate and work together as expected.

Try one "prefix" all over and see if things start working.



On Sep 8, 1:47 pm, Shackadoodl <[email protected]> wrote:
> Hi,
>
> I am currently trying to build a cms plugin with cakephp
>
> i have the following tables:
> users and groups
>
> the associations are in place and are fully working when they are not
> in the plugin
>
> once i move the files to the plugin, and rename them accordingly
> according to the
> manual, cakephp will still load the table that is connected to the
> model, but not
> the associations.
>
> e.g. cakephp will load a user record, but not the user's group
>
> //code from cms_user.php
> class EpicmsUser extends EpicmsAppModel
> {
>
>         var $name = 'User';
>
>         var $belongsTo = array('Cms.Group');
>
> //code from users_controller.php
>
> class UsersController extends EpicmsAppController
> {
>         var $name = 'Users';
>
>         var $uses = array('Epicms.User');
>
> //end of code
>
> if needed i can provide more code.
>
> I have already tried the app:import suggestion, as well as rewriting
> all the
> associations to the long notation, but none will work.
>
> I hope that somebody can provide me with some ( hidden? ) insight as
> to
> why the plugin associations won't work.
>
> Best regards
> Gregory
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to