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 <greg.baker....@gmail.com> 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 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to