Page 1 of 1
Associations without keys
Posted: Tue 02 Apr 2013 18:08
by mepolsen
Is it possible to create an association between two entities where no foreighn keys exists in the database. If ca foreign key is needed, can this be restricted to the model only, so as not to modify the database?
Thanks
Re: Associations without keys
Posted: Thu 04 Apr 2013 08:08
by Shalex
Yes, you can create an association in the model without foreign keys in the database in the following alternative ways:
1) turn off the "Model Settings > Synchronization > Mapping > Enable automatic synchronization of storage part and mapping of the model with its conceptual part" option and create an association in CSDL
2) create an association in CSDL (and corresponding constraints in SSDL will be created if the synchronization option is enabled) but do not apply the foreign key changes in the Update Database From Model wizard when using it