google-code-export / dblinq2007

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

Entities for tables without primary keys should not implement INotifyPropertyChanging/INotifyPropertyChanged. #230

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the following commands:

    DbMetal  /code:d.cs src\DbLinq.MySql\Test\NorthwindMySql.dbml
    sqlmetal /code:s.cs src\DbLinq.MySql\Test\NorthwindMySql.dbml

2. Compare the output.  At concern here is that DbMetal implements the 
INotifyPropertyChanging and INotifyPropertyChanged interfaces for the 
CaseTest table, which has no primary keys.  .NET SqlMetal does not.

We should follow .NET SqlMetal here for two reasons:

1. It's what current linq-to-sql users will expect.
2. DbLinq core requires primary keys in order to handle property change 
tracking, and the whole reason those interfaces are implemented is for 
change tracking.  If we can't perform change tracking, why implement the 
change-tracking infrastructure?

Original issue reported on code.google.com by jonmpr...@gmail.com on 8 Apr 2010 at 7:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1389.

Original comment by jonmpr...@gmail.com on 9 Apr 2010 at 2:54

GoogleCodeExporter commented 9 years ago
Closing.

Original comment by jonmpr...@gmail.com on 9 Apr 2010 at 7:56