When starting with a physical SQL Server model

Apr 13, 2009 at 6:56 PM
I had a few questions, mostly surrounding starting with a physical SQL server model already in place.

1) How do you deal with tables that have duplicate keys out to the same table ?

Example: a Buddy table which has a UserID and BuddyUserID (for an instant messaging app for example).

At first pass Sculpture seems to be upset that there are 2 "User" objects on the Buddy entity.

"Error    1    Duplicate Property Names (BuddyList).    C:\Source\Sculpture\SculptureSolution2\Model\SculptureSolution2.Model\SculptureModel.Sculpture    0    1    SculptureSolution2.Model"

2) Is there a strategy (besides manually removing them all) for marking certain columns (which are now Members) as Audit Fields based on their name? Meaning, those columns wouldn't be needed until all the way back at the persistence layer. I wouldn't want them showing up as text boxes etc.

Thanks,
Sean
Coordinator
Apr 14, 2009 at 11:54 AM

1) How do you deal with tables that have duplicate keys out to the same table ?

Just change the name of the role of the association, Sculpture detects that the generated code will contains two properties with the same name in one entity, so you must change the name of one of them.

2) Is there a strategy (besides manually removing them all) for marking certain columns (which are now Members) as Audit Fields based on their name? Meaning, those columns wouldn't be needed until all the way back at the persistence layer. I wouldn't want them showing up as text boxes etc.

Sure,  Just set the property of  "Is UI Member" of the Audit Fields to false and it will not be generated in your user interface.

You are welcome.
Negm.
Jun 23, 2009 at 8:40 AM

Hello,

Thanks for this hlepful framework.

Could you please be more precise about this answer?

I understand 'role of the association' from OR terminology.

However I have a table that is associated with many others for the purpose of maintaining a consistent structure with nomenclatures that vary between business contexts.

are you suggesting that I must rename the foreign key columns in each of the tables that references the re-used table id's so that the column names are unique throughout the database?

Thanks,

Kimball