google-code-export / dblinq2007

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

Can't generate classes for tables with 2 foreign keys pointing to the same table. #313

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For the following table in SQLite

   CREATE TABLE translation (
    _id INTEGER PRIMARY KEY NOT NULL,
    originId INTEGER NOT NULL,
    targetId INTEGER NOT NULL,
    FOREIGN KEY(originId) REFERENCES expression(_id),
    FOREIGN KEY(targetId) REFERENCES expression(_id),
    UNIQUE(originId, targetId));

The following output is generated

   DbLinq Database mapping generator 2008 version 0.20
   for Microsoft (R) .NET Framework version 3.5
   Distributed under the MIT licence (http://linq.to/db/license)

   >>> Reading schema from SQLite database
   DbMetal: A seqüência contém mais de um elemento de correspondência

(Or "The sequence contains more than one item of correspondence" in english)

The version used was DbLinq-0.20.1
When I remove one of the Foreign keys the error message dissapears

Original issue reported on code.google.com by jaderd...@gmail.com on 24 May 2011 at 4:24