Note that there are some explanatory texts on larger screens.

plurals
  1. POEF4 Database First Model Design based on properly normalized table
    primarykey
    data
    text
    <p>I have created a Conceptual Model in my project using a table in my database. This table is related to a few other tables in the database which I will not be creating models for in project (tables are large and were designed for another app). Instead, my DBA has created some stored procedures for me to use that will return the related data I need from those tables (using Complex Types). </p> <p>The Conceptual Model has three properties that are mapped to three ID columns in the table (FKs of related tables). In the View of my project, I am binding the model to a gridview, so the field values with IDs are not very useful. To that end, I added the stored procedures mentioned above and imported the functions to Complex Types and then added Complex Type Properties to the Model for each Complex Type. This didn't work. I kept getting Error 3004: Problem in mapping fragments...where the Complex Type properties where not mapped to a value in the model.</p> <p>Here is an example of my table with one of the Complex Type Properties:</p> <p>DisplayID<br/> StoreID = StoreID, StoreName, StoreLocation **<br/> OrderID<br/> ProductID<br/> DisplayLocation<br/> DisplaySize<br/></p> <p>** The StoreID being the Complex Property Type and the StoreID, StoreName, StoreLocation makeup the ComplexType; I map the StoreID of the Complex Type to the StoreID of the table in the database.</p> <p>My scenario above does not really fit the examples I've seen of adding Complex Property Types. Examples I've seen are like below:</p> <p>DisplayID<br/> Store = StoreName, StoreLocation<br/> Order<br/> Product<br/> DisplayLocation<br/> DisplaySize<br/></p> <p>Do I need to change the table structure in the database like the example immediately above? Should I create tables in the database for each of the Complex Types instead? Need to know why so I can convince my DBA to use the columns I need instead of the ID columns and to create new tables in lieu of the stored procedures he created for me.</p> <p>Thanks in advance for your help!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload