[since jira is down..  maybe someone has a solution or idea?  I created a 
simple example...]


I'm reverse engineering a large (100+ tables) schema and encountered the

Property "X" in "TableY" was already declared, but it must be declared only once

message and was unable to find a satisfactory solution or explanation, so I 
tried to find a small example of the problem. In doing so I may have also 
found another bug where entities do not get generated for existing tables. 
Attached are

   1. 
   
   Two tables referencing the same table.column as foreign key. This seems 
   to have been the problem in the past, but here seems to work fine.
   
   doctrine-declare-only-once.c1-only.sql
   2. 
   
   This example has two tables both referencing the same two other tables, 
   and results in the error
   
   Property "c2" in "C1Table" was already declared, but it must be declared 
   only once
   
besides being two foreign key constraints, isn't that different than the 
first.

doctrine-declare-only-once.sql

2(b). *NOTE*: if you comment out either of the foreign key constraints in 
either table tab1 or tab2, the error goes away. But one of these tables 
will then not be generated... try it.

   1. 
   
   The column c2_id is renamed to c2_idxx from the above, and now the 
   message goes away. But neither tab1 nor tab2 are generated! If you look at 
   the other two files there are references to tab1 & tab2 though.
   
   doctrine-declare-only-once.tab2-renamed.sql
   
These files and a script to call them are also at 
https://github.com/toddkaufmann/DoctrineORMBug1

Thanks.

<http://tkr1.b23.com/i5/hi0713.gif?orm.gg817>


-- 
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.

Reply via email to