"just reread my note, hope i didn't sound like a jerk with the "as we are all trying to learn here..." line. I wish google groups had some sort of inflector::readNice() function. Ha! Appreciate your help "
;) NP I understood, yes we are all trying to learn here. On Apr 30, 4:11 pm, validkeys <[EMAIL PROTECTED]> wrote: > just reread my note, hope i didn't sound like a jerk with the "as we > are all trying to learn here..." line. I wish google groups had some > sort of inflector::readNice() function. Ha! Appreciate your help > > On Apr 30, 5:57 pm, validkeys <[EMAIL PROTECTED]> wrote: > > > I did it the way that i did it so that I could write controller > > actions in the join table controller vs. in the relational tables. I > > guess you could just write those actions in the M2M controllers, but > > is it not cleaner to write those controller actions directly in the > > controller of the join table? Also, it keeps it clean with regards to > > creating custom model queries for the join table. > > > David, as we are all trying to learn here, are their any definite > > downsides to the way that I am doing it besides the output data? > > > Thanks! > > > On Apr 30, 5:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > The way that validkeys describes is the exact same way that CakePHP > > > implements a HABTM relationship. It uses a join table just as > > > described. There really is no need to do it the way validkeys > > > describes, you don't need a controller and model for the join table, > > > it will just make your output data and query conditions that much more > > > complicated. If you need to get at extra data in the join table (data > > > other than the primary key) use the "with" key in the HABTM > > > relationship definition. > > > > On Apr 30, 2:58 pm, validkeys <[EMAIL PROTECTED]> wrote: > > > > > 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 -~----------~----~----~----~------~----~------~--~---