Skip to content

Secondary Keys ​

Neofox: thumbsup UNLOCK NEW RELATIONSHIPS

Secondary Keys let components reference Entities or Objects, enabling powerful relationship patterns!

a fennec carrying a golden key

What are Secondary Keys? ​

fennecs allows component types, which act as primary keys, to also reference an additional secondary key. This enables rich relationship modeling between entities and objects.

Quick Reference ​

Key TypeDescriptionUse Case
Plain ComponentNo secondary keyStandard component data
RelationTarget is an EntityEntity-to-Entity relationships
Object LinkTarget is an ObjectEntity-to-Object associations

Key Types ​

Secondary keys may be:

  • Nothing - a Plain Component with no secondary key
  • Entity - designating the component as a Relation to the target Entity
  • Object - constituting an Object Link to a reference type

Neofox: magnify Wildcards

Wildcard Match Expressions (Match.Any, Match.Target, Entity.Any, Link.Any) match whole categories of secondary keys – in Queries, and also in Remove<C>(Match) to strip all matching components in one structural change.