This is a migrated thread and some comments may be shown as answers.

Metaproperty nullable in domain model

1 Answer 53 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 12 Aug 2010, 11:02 AM
Just a quick question.
I have created a new domain model from an existing database and have noted that the nullable property of some of the items in a class do not correspond to the nullable property of the field in the database. For example, the domain model diagram for an object named SiteService has an element named Zonenumber which has the nullable metaproperty = False but in the database table which this object is mapped to, the corresponding field is nullable. The reverse is also true - not nullable field definitions in the table are nullable in the model.

Why are these two 'nullabilities' not the same?

Regards,
Jonathan

1 Answer, 1 is accepted

Sort by
0
Petko_I
Telerik team
answered on 16 Aug 2010, 06:34 PM
Hi Jonathan Simmons,

The nullable facet of a property indicates whether the property in the class can be null and by default the facet value is set to false. It is separated from the null behavior in the database (the column nullable attribute in the .rlinq file). There are scenarios where this separation comes in handy. For example, you have a legacy database where many columns allow null, you want to forbid the null values in some of these columns and instead of changing the database schema you can enforce a rule in the conceptual layer. You can nevertheless change the null option for a column with the help of our Table Editor – right-click on a column in the Model Schema Explorer, select Edit column and check/uncheck the Allow nulls check box. To propagate the changes to the database you will need to interact with the Update Database From Model wizard and execute a schema migration script.

Do not hesitate to contact us if you want to suggest improvements or you want to discuss further this or other issues.

Sincerely yours,
Petko_I
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Design Time (Visual Designer & Tools)
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Petko_I
Telerik team
Share this question
or