@DanielMedia Why not just ad the field document_number [INT] to documents (with maybe NUL as possible value). Its just one more field, and your setup would require a join etc. (a lot more db querying than needed)
With the fact being a Document only can have 1 number ... which would sound sane to me -.- documents -------------------------- id number title body created modified document_attachments ----------------------------------- id document_id attachment created modified On May 23, 7:39 pm, DanielMedia <danielmedi...@gmail.com> wrote: > How about creating a multiple table setup? This would let you have > many attachments, etc per document. Then all you would have to do is > check the sub-tables for any data relating to the document's ID. > > documents > -------------------------- > id > title > body > created > modified > > document_attachments > ----------------------------------- > id > document_id > attachment > created > modified > > document_numbers (Just an example based on your message above) > --------------------------------- > id > document_id > number > created > modified --~--~---------~--~----~------------~-------~--~----~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---