This may be useful? http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3
On Apr 27, 4:08 am, turbo2ltr <turbo2...@gmail.com> wrote: > Thanks, This is precisely the schema I was going to use. I guess I'm > not quite sure what I'm asking....or maybe it's that I already know > the answer.. heh. > > Guess I'll just play with it and see what I come up with...I think my > concern is more around building the view. With the right > relationships, it should get all the data, it's just a matter of > passing the names of the attributes to the view. Maybe it's easier > than I thought. Thanks! > > -Mike > > On Apr 26, 7:42 pm, "Max H. Thayer" <maxtha...@gmail.com> wrote: > > > > > > > > > Cake relies heavily on pre-defined and configured schemas... for a system > > you describe you might create a relation (table) called > > "user_defined_attributes" > > > with a schema like: > > table name: user_defined_attributes > > id (PK) > > user_id (FK to your user) > > attrb_title > > attrb_description > > > table name: user_entries (table containing actual entries) > > id (PK) > > user_Id(FK to your user/s) > > user_defined_attribute_id (FK to the above table) > > entry_value > > > a model like this keeps users out of the actual DB structure manipulation > > (which is a big issue to have to address) > > Cake can then handle this with its standard HABTM/HasMany construct. > > > Max H. Thayer > > maxtha...@gmail.com > > > On Apr 26, 2011, at 10:31 PM, turbo2ltr wrote: > > > > I'm working on a system that needs to allow users to add their own > > > attributes to the DB. For instance if you had a movies database, I > > > need to allow the user to go into the attribute configuration and add > > > "genre" which would allow every record in the movie DB to have a genre > > > field. When they view a movie, it would need to dynamically render a > > > view for all the custom attributes based on the attribute > > > configuration. > > > > I've done this many times in PHP using link tables so I know how to do > > > it. The biggest hurdle with learning cakePHP is knowing what it can > > > do. I could code this up manually then find out there was an easy way > > > to do it. I didn't see anything in the manual about it so I'm just > > > asking....are there any features of cake that would make this specific > > > task easy(er)? Or will I have to handle it all manually? Any tips > > > for those that have done it already? > > > > Thanks, > > > Mike > > > > -- > > > Our newest site for the community: CakePHP Video > > > Tutorialshttp://tv.cakephp.org > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > > > others with their CakePHP related questions. > > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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