Relatude Help

3 Scalar properties and their attributes

A property needs no attribute: the engine infers a sensible property model from its CLR type. Add an attribute when you want indexing, validation, faceting or search.

The most important flag is Indexed. A property must be indexed to be filtered and sorted efficiently, and to be a facet. Without an index, the engine scans.

  • The attribute catalogue — All of them inherit these options from PropertyAttribute:
  • Strings — [StringProperty] has the most options. Here they all are on one property:
  • Numbers — Numeric attributes share MinValue, MaxValue, DefaultValue, Indexed and NotFacet. FacetRangePowerBase and FacetRangeCount control how the engine splits the values into buckets when you ask for a range facet:
  • Enums — Declare the property as your enum type. The engine stores it as an integer and fills in the enum's names (FullEnumTypeName, LegalValues, LegalValueNames), so the admin UI and facets show names rather than numbers:
  • Validation happens on write — The engine checks LegalValues, LegalCharacters, RegularExpression, MinValue/MaxValue, MinLength/MaxLength, UniqueValues and MinNoInstances/MaxNoInstances every time a node is written. A write that breaks a rule fails…
  • 3.1 Overriding attributes — An override changes an attribute without editing its declaration. Use one when the type comes from an assembly you do not build, when the property is declared on a base type that other types share, or when one…
  • Passwords — A PasswordValue property holds a password. By default the store keeps it as an Argon2id hash, which can be verified but never read back. A property can also allow a password encrypted with the database's key…