![]() Martin correctly commented that these are in fact the temporal history tables, and therefore can't have PKs or other constraints as they are system managed. Since the project is on GitHub, you can contribute PKs to the schema. But, I can see how someone would think that since the only source of data comes from the non archive table that have PKs, so there is less risk. I guess it was a design choice, you can argue that a table without a primary key is not a relation and of course has no guarantee of being able to identify every row. Now it's obvious that the Archive tables have no primary keys. You will get the following list: TABLE_NAME SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS It is perfectly acceptable to use all columns to uniquely identify a row under the following conditions: A logical key column cannot be defined for the table using the KEYCOLS parameter. SELECT ISNULL (MyPrimaryID,-999) MyPrimaryID, NULLIF (AnotherProperty,'') AnotherProperty. An easy way to apply this is to wrap the select statement of your view in another select. To force entity framework not to use a column as a primary key, use NULLIF. To see which tables have no primary key, run the following script: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES If no primary keys or unique indexes exist on the table being replicated, Oracle GoldenGate will use all columns to uniquely identify a row. To force entity framework to use a column as a primary key, use ISNULL. History table cannot have constraints (primary key, foreign key, table So the explanation is very simple as per the docs. You will see that 100% of these are the history table component of a temporal table pair. | Sales | Customers_Archive | HISTORY_TABLE | | Sales | CustomerCategories_Archive | HISTORY_TABLE | | Sales | BuyingGroups_Archive | HISTORY_TABLE | | Purchasing | Suppliers_Archive | HISTORY_TABLE | | Purchasing | SupplierCategories_Archive | HISTORY_TABLE | | Application | TransactionTypes_Archive | HISTORY_TABLE | | Application | StateProvinces_Archive | HISTORY_TABLE | | Application | People_Archive | HISTORY_TABLE | | Application | PaymentMethods_Archive | HISTORY_TABLE | So i dont want to set primary key for all tables one by one. ![]() And i want that after editing to update whole table. After clicking 'Edit tables' edittables tabitem is appeared. ![]() | Application | DeliveryMethods_Archive | HISTORY_TABLE | And I want to make it work like Sql Server. | Application | Countries_Archive | HISTORY_TABLE | | Application | Cities_Archive | HISTORY_TABLE | | Warehouse | StockItems_Archive | HISTORY_TABLE | | Warehouse | StockGroups_Archive | HISTORY_TABLE | | Warehouse | PackageTypes_Archive | HISTORY_TABLE | | Warehouse | Colors_Archive | HISTORY_TABLE | | Warehouse | ColdRoomTemperatures_Archive | HISTORY_TABLE | WHERE object_id NOT IN (SELECT parent_object_id You can run the following query to see the tables with no primary key.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |