What the model builder validates
At build time (you find out at startup):
- A node type that is a class needs a public parameterless constructor.
- Two parent interfaces may not declare the same property name, and neither may two classes.
Re-declaring an inherited property with
overrideornewis not supported. To give a derived type its own default, text index or display name setting for an inherited property, or to ask for its value index or a facet, use[PropertyOverride](§3.1). - A
[PropertyOverride]must name a property the type inherits (not a system member), with a default the property's type can hold. - Nullable value types (
int?,DateTime?,GeoCoordinate?) are not supported. - The allowed value types are
bool,byte,int,long,double,float,decimal,DateTime,DateTimeOffset,Guid,TimeSpan,GeoCoordinateand enums. Idmust beGuidorstring, and the internal idint,longorstring.- Marker attributes need a matching type:
[DisplayNameProperty]and[AddressProperty]onstring,[CreatedUtcProperty]and[ChangedUtcProperty]onDateTime. - Two types with the same
[Node(Id = …)]but different full names are an error. - A relation class needs the right nested side classes for its shape.
- A
RegularExpressionmust be valid, andMaxNoInstancescan be neither negative nor belowMinNoInstances.
At write time (the transaction fails):
LegalValues,LegalCharacters,RegularExpression, min/max and length bounds, checked afterTrimandCaseTransformhave changed the value. The empty string always passesLegalValuesandLegalCharacters, and enums are not checked against theirs.MinNoInstancesandMaxNoInstancesper type, descendants included, on the counts the transaction leaves.UniqueValues = true: unique across the type. For strings, case is ignored unlessCaseSensitive = true.DisallowCircularReferences = true: no cycles in a self-referencing relation.