Sorry I wan't explicit in my description. My tables are named as such. I just hastily typed in my description of the problem without regard to those details.
On Jun 5, 5:31 am, OptimusS <[email protected]> wrote: > Hi i am new in cakephp but i think your problem is with cake's naming > conventions. Your tables should be named "comments" and "docs" > > On Fri, Jun 5, 2009 at 3:28 AM, Greg Baker <[email protected]> wrote: > > > I have the following scenario.. A user can upload a document, that > > document can be commented on, then a new document can be uploaded and > > 'attached' to that comment. This gives a chain of objects kind of > > like this: > > > doc-comment-doc-comment-doc-comment > > > Where the cardinality of associations is 0..1 for each association. > > In my tables I have the fields doc (comment_id) and a field in comment > > (doc_id). > > I have tried making the following associations in my models: > > > doc belongsTo comment > > doc hasOne comment > > > comment belongsTo doc > > comment hasOne doc > > > ...but this gives me a weird SQL error: "Not unique table/alias: > > 'Comment'". I'm kind of lost, can anyone help me? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
