.NET Framework Bookmark and Share   
 index > Microsoft Codename 'Oslo' > Combined primary keys - not allowed?
 

Combined primary keys - not allowed?

Are combined primary keys not allowed?

I get a warning "(0,0): warning : Cannot create security views for the table '[HuagatiRes].[commission_structure_rbd]' because it has no primary key." when I generate 'rich' SQL from a M model containing tables with combined PKs.

E.g.

//dbo.commission_structure_rbd
typecommission_structure_rbdTypeDef
{
commission_structure_id:Guid;
reservation_booking_designator_code:Textwherevalue.Count<=40;
commission_rate:Decimal28?;
commission_floor:Decimal28?;
commission_ceiling:Decimal28?;
currency_code:Textwherevalue.Count<=40;
created_by_user_id:Guid?;
created_date_time:DateTime?;
last_modified_by_user_id:Guid?;
last_modified_date_time:DateTime?;
}whereidentity(commission_structure_id,reservation_booking_designator_code)
,commission_structure_idincommission_structure.commission_structure_id//commission_structure_commission_structure_rbd_FK1
,reservation_booking_designator_codeinreservation_booking_designator.reservation_booking_designator_code//reservation_booking_designator_commission_structure_rbd_FK1
,currency_codeincurrency.currency_code//currency_commission_structure_rbd_FK1
;
commission_structure_rbd:commission_structure_rbdTypeDef*;

Kris
KristoferA
This is abug (or, if you are feeling lenient, an unimplemented feature) in the extra code that runs when you specify /t:Repository.
  • Marked As Answer byKristoferA Tuesday, November 25, 2008 2:14 AM
  •  
Gudge
Kristofer, I'll make sure you get an answer ASAP.
Mike Weinhardt
This is abug (or, if you are feeling lenient, an unimplemented feature) in the extra code that runs when you specify /t:Repository.
  • Marked As Answer byKristoferA Tuesday, November 25, 2008 2:14 AM
  •  
Gudge
Ok,unimplemented feature it is. :)

(meaning: it will be supported later, right?)
Kris
KristoferA
Kris,

You can work around it today by specifying a surrogate key and a unique constraint on the existing fields.

And yes, we hope to fix it before release :-)

Gudge
Gudge
Update for the May CTP:

(0,0): warning M3906: Cannot create security views for the table '[X].[Y]' because it has no primary key.

This error is still present when compiling M to -package:Image format (for use in Quadrant).

In my case i use compound primary keys with varchar values.


Manually importing the generated schema into Quadrant (with TSql10 output) works.
Note that Quadrant then has some unexpected behaviour when wanting to mutate data. Data is displayed perfectly when it is added through Sql Server Management Studio. It looks promising, i like the design :)
Performing my Final Project, looking into codename "Oslo".
Elger [Centric]

You can use google to search for other answers

Custom Search

More Threads

• A nice typo in the draft specification
• Any Transformation from XSD to MSchema
• Installer problem in OSLO January CTP
• text (via mgrammar) => mgraph => ?
• When will quadrant be available for download?
• CreateRepository fails to "assign a default value to a local variable" and to "locate a scalar variable @login"
• Change Data Capture gives error: invalid number of arguments
• Modeling Project x Oslo
• Cannot find an "Oslo" project template in Visual Studio 2010
• Uppercase text pattern expression in mschema