Wednesday, June 19, 2013

Multiple model types specialization/generalization

Hello,

How can I implement multiple types of models?
example:
User (common attributes) (used in the ACL for authentication)
     User_type_A (specific profile atributes)
     User_type_B (specific profile atributes)

User_type_A should be treated as (User data + specific data)
I tried to use User hasOne User_type_A
                   User hasOne User_type_B

there are problems:
to add a new User_type_A  I can not use its own Controller to save User (parent commom data) 

specializations also relate to others specific model types, and this way cant retrive the parent model data. to do this work i would have to relate to the parent model because then I would have data from 2 models (because hasOne)

how can implemnetar this? for cake use (User+User_type_A) as one entity user_A 

or (Project+Project_type_A) as Project_A



--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: