|
Autonumbering fields inside Composite Primary Keys not supported Topic updated 13-4-2007 |
|
The Table Template performs this validation. A table with a composite primary key containing an autonumbering field (identity / autonumber /autoincrement fields, fields with sequences, etc.) makes the table item invalid.
Having an autonumbering column is generally the best way of defining primary keys when using NHibernate. An autonumbering primary key are unique by itself. No extra columns are needed to make the primary key values unique. NHibernate does not allow the definition of composite primary keys that contain both:
Workaround Just remove the other columns from the Key, turning it into a single column primary key. This is required only at the Database Repository level in Genwise. However, it would be recommended to also do it in your database. To turn the primary key in the Database Repository into a single field primary key follow these steps:
|