TechTalk Genome v4.2

<Sealed> Element

Specifies that the type family of the type is not polymorphic - the type family contains a single class.

<Type name=" type ">
<Sealed />
</Type>
type
A root class of a type family.

Remarks

Mapping the type with <Sealed> element means declaring that the type has no descendants. The C# class modifier sealed cannot be used for persistent classes because Genome creates inherited classes from the type to implement proxies. <Sealed> element also means that the dynamic type of an instance persisted to the database is always the type.

As opposed to the <TypeDiscriminator> element , this type identity provider does not demand that additional fields are defined in the database table for identity. Therefore, it provides a solution for mapping existing databases. The overhead of handling polymorphism and an additional field is eliminated.

Examples

The class Employee has no descendants.

  <Type name="Employee"> 
    <RootInheritance /> <Sealed /> ... </Type> 

Requirements

Type: TechTalk.Genome.Mapping.SealedXmlData

Assembly: TechTalk.Genome.dll

Version: 4.2.11

Editions: Professional, Evaluation, Express

Database Platforms: Microsoft SQL Server 2000, Microsoft SQL Server 2005, Oracle 9i Release 2, Oracle 10g Release 2

See Also

Type Identity Providers