JoC, HABTM are good, but another way that I have been modeling M2M relationships is the following:
assume we had students and classes. One class has many students and one student is in many classes classes ------> | classes_students | <---------- students 1. create tables for classes, classes_students and students 2. Create models and controllers for all 3 tables (note that the Model for the classes_students would be ClassesStudent) Your classes and students models would have many classes_students Your classes_students model would belong to classes and students. Thats another way to set up the M2M relationship. On Apr 29, 11:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Cake can handle a many to many relationship just fine. Do a search for > HABTM (has and belongs to many) relationship to learn more about how > to do this. Cake has sort of a steep learning curve, especially if you > aren't familiar with MVC and OO programming. So, In my opinion Cake > will make this task MUCH easier for someone well versed in Cake or at > least well versed in MVC/OO. If you are just learning it will probably > make the task moderately easier but any future web programming you do > with it will be much easier and faster with Cake than developing > without a framework. > > Dave > > On Apr 29, 8:10 am, JoC <[EMAIL PROTECTED]> wrote: > > > Hello all, > > I am trying to write a maintenance software for a generator > > distributing company. > > The company works the following way > > > 1 site has many generators > > 1 generators has 1 manufacturer and many parts > > 1 part has many generators > > 1 manufacturer has many generators and many models > > 1 model has one manufacturer > > 1 part works for many generators > > 1 manufacturer makes many models > > . > > . > > . > > > Anyways as you can see is a very complex system. To which then we will > > add work orders, maintenance, etc.. > > My questions is, will cake PHP make my life easier or harder I have > > been working with it for about 1 week and so far its been ok until I > > introduced the above concept today of many parts to many generators > > etc then it got really complex. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---