jonpryor / dblinq2007

Automatically exported from code.google.com/p/dblinq2007
0 stars 0 forks source link

Duplicated fields for PosgreSQL foreign keys #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is produces when there are more than two foreign keys from one table 
to another.

For example:
CREATE TABLE table1 (id serial primary key);
CREATE TABLE table2 (
  idref1 integer REFERENCES table1 (id),
  idref2 integer REFERENCES table1 (id),
  idref3 integer REFERENCES table1 (id)
);

If you run dbmetal to generate code, you will get:
test.cs(183,35): error CS0102: The type `Table1' already contains a 
definition for `_table21'
test.cs(440,35): error CS0102: The type `Table2' already contains a 
definition for `_table11'

Not: This does not happen when there're only two foreign keys.

Regards,

Original issue reported on code.google.com by juan...@gmail.com on 22 Feb 2010 at 12:35

GoogleCodeExporter commented 9 years ago
This seems to be the same problem as in issue 196. That issue have a patch 
attached,
that you could try.

Original comment by anders...@gmail.com on 22 Feb 2010 at 11:17

GoogleCodeExporter commented 9 years ago
This bug even has the ~same table definitions as issue 196.  I'm declaring a 
dup for 
now.

Original comment by jonmpr...@gmail.com on 10 Mar 2010 at 9:29