Re: HABTM association with three different models
On 10 Wrz, 07:43, Matt <[EMAIL PROTECTED]> wrote: > You might want to rephrase your question is from what I'm reading it > doesn't make sense. > > Are you trying to join three tables on three fields? Maybe try and > explain your problem not your specifc question. Chances are that if it > is becoming extremely difficult to implement than there is probably a > better way to do it. Sorry for that :) writing difficult questions at night is bad idea ;) I want join three models. I'm write system for my school and i'm stuck. Well i did models for teachers and subjects and they works fine. Now i'm working under controller for class. Each Class have name, description and teachers who teach specific subject in this class. All I want to do, is make class in data base, and associate it with subject (with specific teacher) in join table. I hope that i've explain it well (sorry for my lossy English - i'm still learning :P) > Know what, it's a bad idea to write before having your first coffee in > the morning. AD7six, yes ;) Morning coffee it's very important for developers :) On 10 Wrz, 08:41, AD7six <[EMAIL PROTECTED]> wrote: > On Sep 10, 8:03 am, AD7six <[EMAIL PROTECTED]> wrote: > > > On Sep 10, 3:34 am, lemon <[EMAIL PROTECTED]> wrote: > > > > Hi everybody :) > > > >Well first I want to say, that I've already searched answers to my > > > question in this group, and in google, but without results :( > > > > My question is: It's possible to associate three different models > > > with HABTM association in join table who have three fields? > > > a 3 way habtm is a model in it's own right usually. Treat it as such > > and you'll make some progress. > > > That noddy example should have said: > > (stuff, thing and wotsit hasMany Glue, Glue belongsTo stuff, thing and > wotsit) > > i.e. > > Table glues > id > stuff_id > thing_id > wotsit_id > > hth, > > AD Sounds easy :) I'll try to do that for a while :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: HABTM association with three different models
On Sep 10, 8:03 am, AD7six <[EMAIL PROTECTED]> wrote: > On Sep 10, 3:34 am, lemon <[EMAIL PROTECTED]> wrote: > > > Hi everybody :) > > >Well first I want to say, that I've already searched answers to my > > question in this group, and in google, but without results :( > > > My question is: It's possible to associate three different models > > with HABTM association in join table who have three fields? > > a 3 way habtm is a model in it's own right usually. Treat it as such > and you'll make some progress. Know what, it's a bad idea to write before having your first coffee in the morning. That noddy example should have said: (stuff, thing and wotsit hasMany Glue, Glue belongsTo stuff, thing and wotsit) i.e. Table glues id stuff_id thing_id wotsit_id hth, AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: HABTM association with three different models
On Sep 10, 3:34 am, lemon <[EMAIL PROTECTED]> wrote: > Hi everybody :) > >Well first I want to say, that I've already searched answers to my > question in this group, and in google, but without results :( > > My question is: It's possible to associate three different models > with HABTM association in join table who have three fields? a 3 way habtm is a model in it's own right usually. Treat it as such (stuff, thing and wotsit belongsTo Glue, Glue hasMany stuff, thing and wotsit) and you'll make some progress. hth, AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: HABTM association with three different models
You might want to rephrase your question is from what I'm reading it doesn't make sense. Are you trying to join three tables on three fields? Maybe try and explain your problem not your specifc question. Chances are that if it is becoming extremely difficult to implement than there is probably a better way to do it. On Sep 9, 6:34 pm, lemon <[EMAIL PROTECTED]> wrote: > Hi everybody :) > >Well first I want to say, that I've already searched answers to my > question in this group, and in google, but without results :( > > My question is: It's possible to associate three different models > with HABTM association in join table who have three fields? > >If yes then please tell me how to do that, if not please help find > me substitute for that :) I'll be very grateful :) > > TIA > lemon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---