Closed amirrajan closed 12 years ago
Email from Sasha Cikusa:
Just trying it out and noticed the in the following code (made up test table), SalesPersonRegion is not created with a composite PK
string tbl = seed.CreateTable("Region", new dynamic[] { new { RegionId = "int", Identity = true, PrimaryKey = true }, new { Code = "varchar(2)"}, new { Name = "varchar(12)"} }); tbl.ExecuteNonQuery(cp); tbl = seed.CreateTable("SalesPerson", new dynamic[] { new { SalesPersonId = "int", Identity = true, PrimaryKey = true }, new { RegionId = "int", ForeignKey = "Region(RegionId)" }, new { Name = "varchar(12)"} }); tbl.ExecuteNonQuery(cp); tbl = seed.CreateTable("SalesPersonRegion", new dynamic[] { new { SalesPersonId = "int", PrimaryKey = true, ForeignKey = "SalesPerson(SalesPersonId)" }, new { RegionId = "int", PrimaryKey = true, ForeignKey = "Region(RegionId)" } }); tbl.ExecuteNonQuery(cp);
It's not uncommon so I wanted to let you know.
Fixed here: https://github.com/amirrajan/Oak/blob/master/Oak.Tests/describe_Seed/when_creating_table.cs#L279
Will push packages this weekend.
Email from Sasha Cikusa:
Just trying it out and noticed the in the following code (made up test table), SalesPersonRegion is not created with a composite PK
It's not uncommon so I wanted to let you know.