Hi Brian, If the information is correct, that the meeting only takes place yearly, then I would not care to retrieve the non-members information or even keep it for long.
Then my models would be: meetings -> hasMany -> non-members (thus the non-members register their information every time for every meeting) meetings -> hasAndBelongsToMany -> members (where the intersection table will be the attendees table, just named differently to comply with CakePHP standards) The CakePHP models are: Meeting (hasAndBelongsToMany Member, hasMany Guest) Member (hasAndBelongsToMany Meeting) Guest (belongsTo Meeting) Should the meeting take place a lot more often, then I would still go with the two models, one for the members and one for the guests (non- members). You will then have to intersection tables, guests_meetings and meetings_members. The CakePHP models are: Meeting (hasAndBelongsToMany Member, hasAndBelongsToMany Guest) Member (hasAndBelongsToMany Meeting) Guest (hasAndBelongsToMany Meeting) Your model find (Meeting->find) should do a recursive find so that for the chosen meeting, it will pull up all the attendees from the Member model and the Guest model. Does this help you on the way? John On Sep 9, 7:37 pm, brian <[email protected]> wrote: [snip] > All very good questions. I've already asked a couple of them but no > clear response from the client. I thought that I'd add a lookup for > non-members' previous info on subsequent registrations. Something > like, "enter your email address if you've registered for previous > meetings". I don't think there are any security implications as the > person still has to pay and we're not storing any payment info. So > someone couldn't just use someone else's credit card at random. > > The thing that really bugs me about storing both members and > non-members in the same table, though, is that the latter will keep > accumulating because we might end up with a lot of non-returns, year > after year. > > > My suggestion is (until the above is clarified): > > > one meeting -> has many -> attendees -> which may be -> a member or a > > non-member > > > In CakePHP terms: > > meetings -> attendees <- members > > meetings -> attendees <- non-members > > This is closer to what I sort of had in mind. But I can't quite figure > out how I'd do a find(), or how to set up the Attendee model, for that > matter. I've just got vague notions right now. Could you elaborate? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
