Cool... Will just leave it the way it is.
Thanks. Dave -----Original Message----- From: John Andersen [mailto:[email protected]] Sent: May-05-09 5:57 AM To: CakePHP Subject: Re: HABTM question Hi Dave, In my opinion, you should only have one HABTM table between the USER and SYSTEM models. If you need to split your information from the SYSTEM model into separate presentation steps, do it with views or with additional tables/models. Example: Users <--- systems_users ---> Systems <--- steps_systems ---> Steps --- > Tasks where: Users - contains information on the users. Systems - contains information on the possible systems. Steps - contains information on presentation steps within a task. Tasks - contains information on presentation tasks, for example Hardware, Software, etc. and each HABTM table: systems_users - defines the system that the user is assigned. steps_systems - defines the system parts that the user may assign in a specific step within a task. This could also be made just using views. The model above may be incomplete, as I do not know all the factors allowing the user to choose system parts. Your last question is answered with a No! I would never model it that way! Hope this helps you on the way, John On May 5, 6:59 am, "Dave Maharaj :: WidePixels.com" <[email protected]> wrote: > I have a question about if this is possible or if it even make sense to do. > > I have 4 HABTM tables that are for a USER to select options from. The > options are only for choosing and user has no control over any of the > actual options (edit delete add none of that) Now the tables look like > this: > TableA > TableB > TableC > TableD > all have exactly id, name > > User > id > > All the HABTM tables are the same for A, B,C, D TableA_Users tableA_id > user_id > > I have them separate because the User can update their selections on > different pages and not all in 1 form. > > My question is if I made 1 HABTM table users_options > > id > user_id > TableA_id > TableB_id > TableC_id > TableD_id > > Would it possible to do something like that? If so would the user be > able to update TableA options and not mess with other TableX selected options? > > I read about the tree behaviour but have no clue how to use it for > what i am interested in using it for. > > Dave --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
