TechTalk Genome v4.2

Type Identity Providers

Just as the .NET Framework stores dynamic type information along with every object allocated in the memory to provide support for polymorphism, Genome also needs to identify the dynamic type of an object instance stored in the data domain (database). Genome supports several strategies to provide dynamic type information.

All types in a type family share the same type identity model, therefore the type identity model is established by defining it on the root type of the type family.

The TypeDicriminator type identity stores dynamic type information in a selected field. The type and values associated to the individual types can be defined. By specifying the type discriminator for a type family, polymorphism is enabled for each type it contains.

Sealed type identity can be used for type families that are not polymorphic: The type family contains a single class that is the root class. The overhead of handling polymorphism in an additional field is eliminated by Genome . The sealed type identity can also be used to map existing databases without type identity fields (non-polymorphic tables).

See Also

<Sealed> Element | <TypeDiscriminator> Element