I been trying to figure this out and it just seems messed up to me.

 

Basic idea is User can create sub accounts under their main account for
associates to login into their account to manage articles. So if there are
100 articles the account holder can assign different people articles to
manage.

 

So Main User creates a User saving id as normal and in the db is account_id
which is the account holder id so then 

User model:

 

var $hasMany = array(

                                'User' => array(

                                                'className' => 'User',

                                                'foreignKey' =>
'associate_id',

                                                'dependent' => false

                                )

                );

 

var $belongsTo = array(

                                'User' => array(

                                                'className' => 'User',

                                                'foreignKey' => 'id'

                                ),

???? that just seems wrong no? 

 

And same with the Article. It belongs to the Users Profile so article has
profile_id (profile hasMany Article <-> belongsTo Profile) but the Article
is also going to be assigned to an associate_id

 

Lost..

 

Any ideas?

 

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 [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