Relatude Help

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 override or new is 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, GeoCoordinate and enums.
  • Id must be Guid or string, and the internal id int, long or string.
  • Marker attributes need a matching type: [DisplayNameProperty] and [AddressProperty] on string, [CreatedUtcProperty] and [ChangedUtcProperty] on DateTime.
  • 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 RegularExpression must be valid, and MaxNoInstances can be neither negative nor below MinNoInstances.

At write time (the transaction fails):

  • LegalValues, LegalCharacters, RegularExpression, min/max and length bounds, checked after Trim and CaseTransform have changed the value. The empty string always passes LegalValues and LegalCharacters, and enums are not checked against theirs.
  • MinNoInstances and MaxNoInstances per type, descendants included, on the counts the transaction leaves.
  • UniqueValues = true: unique across the type. For strings, case is ignored unless CaseSensitive = true.
  • DisallowCircularReferences = true: no cycles in a self-referencing relation.