Errors with view primary keys
Posted: Mon 27 Aug 2012 18:58
I've got a view that I'm editing in the model designer. It has a bigint view_id field that I would like to be the primary key, but when importing it I get 2 text fields set as pk (Cylinders and Liters).
Based on this post, I change the pk to my view_id field in the entity designer, and get the following errors:
Problem in mapping fragments starting at line 719:Potential runtime violation of table my_view's keys (my_view.cylinders, my_view.liter): Columns (my_view.liter, my_view.cylinders) are mapped to EntitySet VehicleToEngineConfigByBaseVehicleViews's properties MyView.Liter, MyView.Cylinders) on the conceptual side but they do not form the EntitySet's key properties (MyView.ViewId).
Problem in mapping fragments starting at line 719:All the key properties (MyView.ViewId) of the EntitySet VehicleToEngineConfigByBaseVehicleViews must be mapped to all the key properties (my_view.cylinders, my_view.liter) of table my_view.
Do I need to change something else to alter the primary key for my view?
Based on this post, I change the pk to my view_id field in the entity designer, and get the following errors:
Problem in mapping fragments starting at line 719:Potential runtime violation of table my_view's keys (my_view.cylinders, my_view.liter): Columns (my_view.liter, my_view.cylinders) are mapped to EntitySet VehicleToEngineConfigByBaseVehicleViews's properties MyView.Liter, MyView.Cylinders) on the conceptual side but they do not form the EntitySet's key properties (MyView.ViewId).
Problem in mapping fragments starting at line 719:All the key properties (MyView.ViewId) of the EntitySet VehicleToEngineConfigByBaseVehicleViews must be mapped to all the key properties (my_view.cylinders, my_view.liter) of table my_view.
Do I need to change something else to alter the primary key for my view?