This is not a bug. Associations work with foreign keys, so that must be a primary key on the inverse side. Otherwise referential integrity cannot be guaranteed. The "test" you sent is not a test, for it has no assertions. I don't think you should wast more time on that, at least not on posting it.
The problem you presented can be solved by making $productId the id-field (primary key) of Info. Because Info is OneToOne with Product, there is no need for another id in Info. On Tuesday, 11 March 2014 20:08:03 UTC+1, Parsifal wrote: > > > Here: https://groups.google.com/forum/#!topic/doctrine-user/mu66FtmEssI > with the help of Herman, I discovered something and I think it should be > mentioned on Wiki that other newbies don't waste their time like I did: > when mapping if both sides have the same coloumn name (NOT property name) > like this: > 'joinColumns' => array( 0 => array( 'name' => 'product_id', > 'referencedColumnName' => 'product_id', > Either one side should have product_id as a primary key OR if none of them > has it as primary key, one side should have a different coloumn name, > otherwise it throws a proxy notice. > In other word, you cannot have the same joined coloumn name on two tables > if none of them is a primary key, one side should have a different coloumn > name, otherwise you'll get a proxy notice. > I am not sure if this is correct or not, but it happens to me! sounds odd > tough. why there should be such problem? > > > > > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
