Re: Connecting Two HABTM Tables

2008-01-22 Thread AD7six
On Jan 22, 6:37 pm, david_setwise <[EMAIL PROTECTED]> wrote: > I see you point about making the database structure more simple, and I > like it, but does that make the programming logic a lot more > complicated? If I add a Style with 20 colors and 4 sizes, do I have > to manually loop through a

Re: Connecting Two HABTM Tables

2008-01-22 Thread david_setwise
I see you point about making the database structure more simple, and I like it, but does that make the programming logic a lot more complicated? If I add a Style with 20 colors and 4 sizes, do I have to manually loop through all the potential options to save all the corresponding Stock records, o

Re: Connecting Two HABTM Tables

2008-01-22 Thread MrTufty
It does, but you still need a model for the link. If I remember correctly anyway. I think Danielle is correct here though. Your database structure is overcomplicated a little - you could achieve the same goal by having: Size:- id size shortCode Colour:- id colour Style:- id style description

Re: Connecting Two HABTM Tables

2008-01-22 Thread AD7six
On Jan 22, 6:25 am, david_setwise <[EMAIL PROTECTED]> wrote: > Doesn't CakePHP 1.2 support additional fields in a HABTM table? > > David Yes, but I doubt that is going to make your life very easy if you try to administer/user your Colors_Shirts_Sizes table based on that. Wouldn't your Colors_S

Re: Connecting Two HABTM Tables

2008-01-22 Thread david_setwise
Doesn't CakePHP 1.2 support additional fields in a HABTM table? David On Jan 21, 6:15 pm, Ponderosa - Lists <[EMAIL PROTECTED]> wrote: > Your colors_shirts_sizes table should be a new table/model inventory. > > Inventory > - id > - shirt_id > - size_id > - color_id > - inventory_qty > ... any ot

Re: Connecting Two HABTM Tables

2008-01-22 Thread david_setwise
Doesn't CakePHP 1.2 support additional fields in a HABTM table? David On Jan 21, 6:15 pm, Ponderosa - Lists <[EMAIL PROTECTED]> wrote: > Your colors_shirts_sizes table should be a new table/model inventory. > > Inventory > - id > - shirt_id > - size_id > - color_id > - inventory_qty > ... any ot

RE: Connecting Two HABTM Tables

2008-01-21 Thread Ponderosa - Lists
Your colors_shirts_sizes table should be a new table/model inventory. Inventory - id - shirt_id - size_id - color_id - inventory_qty ... any other inventory information needed such as location etc. As soon as you need more than just the cross reference id's in the table (like your inventory qu