This topic enumerates possible validation errors () and warnings () and provides hints on what you can do with them.
Association:
Invalid association MyAssociation. A parent class must be specified.
A parent class is missing.
You should specify a parent class.
Invalid association MyAssociation. A child class must be specified.
A child class is missing.
You should specify a child class.
Invalid association MyAssociation. At least one Parent property must be specified.
There are no Parent properties.
You should specify at least one Parent property.
Invalid association MyAssociation. At least one Child property must be specified.
There are no Child properties.
You should specify at least one Child property.
Invalid association MyAssociation. The number of Child properties must be same as number of Parent properties.
The number of Child and Parent properties should be equal.
You should specify equal number of Parent and Child properties.
Invalid association MyAssociation. The number of Child properties must be same as number of Parent properties.
The number of Child and Parent properties should be equal.
You should specify equal number of Parent and Child properties.
Invalid association name MyAssociation.
Association name is not valid.
You should specify valid association name.
Invalid association MyAssociation. The Generate property not specified.
The Generate property not specified.
You should specify the Generate property.
Invalid association MyAssociation. The same property is listed more than once: Property1
Some property is listed more than once.
You should specify each property only one time.
Invalid association MyAssociation. Properties do not have matching types: Type1, Type2
Properties do not have matching types.
Properties should have matching types.
The Type element MyClass contains the Association element MyAssociation but does not have a primary key. No code will be generated for the association.
The Type element contains the Association element, but does not have any primary key. You should specify a primary key to generate the code for the association.
Inheritance:
Invalid inheritance MyInheritance. A base class must be specified.
A base class is not specified.
You should specify a base class.
Invalid inheritance MyInheritance. A derived class must be specified.
A derived class is not specified.
You should specify a derived class.
MyInheritance: cannot derive from sealed type MyClass.
The class that is sealed can not have any further inheritance.
You should change the Inheritance Modifier value of the class to unseal the it.
Inconsistent accessibility: base class MyClass is less accessible than class MyClass1.
The accessibility level (accessibility modificator) of an inherited class can not be higher relatively to the base class.
The accessibility level of the inherited class should be either equal to that of the database or lower relatively to the base class.
Invalid inheritance MyInheritance. The type element MyClass is a subtype and cannot contain the primary key column Column1.
The type element can not contain the primary key column because it is a subtype.
If the class is not a base one, it is a subtype of the base class and its fields can not be key fields. You should remove all key fields for the classes that are subtypes by setting the Primary Key property to False: Primary Key = false;.
Invalid inheritance MyInheritance. The class can have only one base class.
A class can have only one base class.
The inherited class should have only one base class.
Invalid inheritance MyClass. Base Class Discriminator Value and Derived Class Discriminator Value properties of Inheritance cannot contain the same value.
Base Class Discriminator Value and Derived Class Discriminator Value properties should not have the same value.
The Discriminator property should have different values for base and inherited class.
Invalid inheritance MyClass. Value Value1 is not valid for property Property1 in inheritance relation.
Value Value1 is not valid for property Property1 in inheritance relation.
You should assign valid values for properties.
Invalid inheritance MyClass. Value for property Inheritance Default cannot be empty.
Value for property Inheritance Default is empty.
You should assign value for the Inheritance Default property.
Invalid inheritance MyClass. Value for property Discriminator Property cannot be empty.
Value for property Discriminator Property is empty.
You should assign value for Discriminator Property.
Invalid inheritance MyClass. The Column element Column1 of the Type element MyClass cannot be used as a discriminator because its Type is Type1.
DiscriminatorProperty can be of the following type:
• | System.Boolean |
• | System.Byte |
• | System.Char |
• | System.Int16 |
• | System.Int32 |
• | System.Int64 |
• | System.SByte |
• | System.String |
• | System.Data.Linq.Binary |
• | System.UInt16 |
• | System.UInt32 |
• | System.UInt64 |
To use a Column element as a discriminator choose it in DiscriminatorProperty in the Inheritance Editor window.
MyClass.Property1 hides inherited member MyBaseClass.Property1. Use another name.
The inherited class has the same method (or property) signature as the base class.
If the method (or property) on the base level can not be redefined, apply the keyword NEW to the method in the inherited class or rename the method.