Inheritance Properties

NHibernate inheritance has the following properties:

General

Base Class

Denotes the base class.

Abstract

Determines whether an instance of the class can be created. Can accept the following values: True or False.

Assembly

Assembly that contains the entity class.

Attributes

Attributes of the object.

Batch size

Batch size for fetching instances of this class by identifier.

Cache

It is possible to configure a cluster or process-level cache on a class-by-class and collection-by-collection basis. You may even plug in a clustered cache. The cache attribute of a class or collection mapping includes the two elements below.

Region

(optional, defaults to the class or collection role name) specifies the name of the second level cache region.

Usage

Specifies the caching strategy, acceptable values are None, ReadWrite, NonStrictReadWrite and ReadOnly.

Constructor Modifier

Specifies the accessibility level of the class constructor. Can accept the following values: Public, ProtectedInternal, Internal, Protected, Private.

Discriminator

A column or formula used to distinguish individual subclasses.

Column

Specifies the discriminator column.

Check

SQL check constraint on the column.

Default Value

Default value (SQL expression) for the column.

Fixed Length

Indicates that the column stores fixed-length textual or binary data. Can accept the following values: True or False.

Index Name

Name of a (multi-column) index.

Length

Column length.

Name

Name of the database column.

Not Null

Specifies that the column is non-nullable. Can accept the following values: True or False.

Precision

Displays the maximal number of digits used by the column data type. Applicable to the numeric fields.

Scale

Displays the number of digits to the right of the decimal point in a number used by the column data type. Applicable to the numeric fields.

SQL Type

Specifies the type of the column in the database table.

Unicode

Specifies that the column stores data in Unicode format. Can accept the following values: True or False.

Unique

Specifies whether the column has a unique constraint. Can accept the following values: True or False.

Unique Key

Name of a multi-column unique constraint.

Force

"Forces" NHibernate to specify allowed discriminator values even when retrieving all instances of the root class.

Formula

An arbitrary SQL expression that is executed when a type has to be evaluated.

Insert

Set this property value to False, if your discriminator column is also a part of a mapped composite identifier.

Model

Attributes

Attributes of the object.

Auto-Import

Specifies whether unqualified class names can be used in the query language.

Connection

Specifies database connection.

Default Access

Specifies the default strategy that is used to access a property value. Acceptable values are Property, Field, Nosetter and None.

Default Assembly

Specifies the default assembly to assume for unqualified class names.

Default Cascade

Specifies which operations should be cascaded from parent objects to associated objects by default. Acceptable values are None and SaveUpdate.

Default Collection Generic

Defines the default value of the generic property used for the Many end of associations. Acceptable values are True and False.

Default Collection Type

Default collection type used for the Many end of associations. Acceptable values are Set and Bag.

Default Identity Generator

Specifies the identity generation method to be used for identity properties that do not specify their own generator. Acceptable values are: assigned (the generator set for the whole model), foreign, guid, guid.comb, guid.native, hilo, identity, increment, native, select, seqhilo, sequence, sequence-identity, uuid.hex, uuid.string and custom.

Default Lazy

Enables or disables lazy fetching. Acceptable values are True and False.

Default Length

Default length used for database columns.

Default Namespace

Specifies the default namespace to assume for unqualified class names.

Default Precision

Defines the default maximum number of digits for database columns.

Default Scale

Defines the default number of digits to the right of the decimal point for database columns.

Default Schema

Specifies the default schema for database tables.

Default Unicode

Specifies whether to use the Unicode encoding for database columns by default. Acceptable values are True and False.

Entity Base

Base class or interface for the entity classes.

Filters

This parameter allows calling the Filters Editor dialog box that enables creating and editing filters, then they can be attached to the appropriate mapping elements, for details see Filtering Data.

Modifier

Specifies the visibility level of the class. Acceptable values are Public or Internal.

Name

The name of the model.

TypeDefs

This parameter allows calling the TypeDefs Editor dialog box that enables creating and editing TypeDefs.

Type

The type of the discriminator column.

Discriminator value

A value that distinguishes individual subclasses.

Documentation

LongDescription

Detailed description of the class.

Summary

Brief description of the class.

Dynamic Insert

Specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null. Can accept the following values: True or False.

Dynamic Update

Specifies that UPDATE SQL should be generated at runtime and contain only the columns whose values are not null. Can accept the following values: True or False.

Entity Base

The name of the class or interface which is base for this specific class.

Filter

Specifies the filter to be used when retrieving objects of the base class.

A filter criterion allows you to define a restriction clause similar to the existing "where" attribute available on the class. These filter conditions, however, can be parameterized. The application can then decide at runtime whether certain filters should be enabled and what their parameter values should be. Filters can be used like database views, but they are parameterized inside the application.

In order to use filters, they must first be defined and then attached to the appropriate mapping elements, for details see Filtering Data.

Generate Data Contract Attribute

Specifies that the class defines a data contract and is serializable by a serializer. To make the class serializable, define a data contract for the class. To create a data contract, apply the Generate Data Contract Attribute to the class and apply the Generate Data Member Attribute to any fields or properties that must be serialized.

Join Tables

Specifies additional tables joined to the main tables of the class.

Lazy

Enables or disables lazy fetching. Can accept the following values: Default, True, or False.

Modifier

Specifies the visibility level of the class. Acceptable values are Public or Internal.

Mutable

Specifies whether instances of the class may be updated and deleted. Can accept the following values: True or False.

Name

Name of the entity class.

Namespace

Namespace where the entity class resides.

Optimistic Lock

Determines the optimistic locking strategy. Can accept the following values: Version, None, Dirty, All.

Persister

Custom IClassPersister implementation.

Polymorphism

Determines whether implicit or explicit query polymorphism is used. Can accept the following values: Explicit or Implicit.

Properties

Properties of the class.

Proxy

An interface to use for lazy initializing proxies.

Schema

Schema of the database table.

Select Before Update

Specifies that NHibernate should never perform an SQL UPDATE unless it is certain that an object is actually modified. Can accept the following values: True or False.

Shape Color

The color of objects on the diagram.

Subselect

An SQL query for entity fetching. It is used to define a read-only/immutable entity which is based on the results of an arbitrary native query.

Synchronize Tables

Defines tables that will be affected after executing the SQL query. It is used only if the Subselect query is set for the entity.

Table

Name of the database table.

Where

An arbitrary SQL WHERE condition to be used when retrieving objects of this class.

Derived Class

Denotes the derived class.

Abstract

Determines whether an instance of the class can be created. Can accept the following values: True or False.

Assembly

Assembly that contains the entity class.

Attributes

Attributes of the object.

Batch size

Batch size for fetching instances of this class by identifier.

Cache

It is possible to configure a cluster or process-level cache on a class-by-class and collection-by-collection basis. You may even plug in a clustered cache. The cache attribute of a class or collection mapping includes the two elements below.

Region

(optional, defaults to the class or collection role name) specifies the name of the second level cache region.

Usage

Specifies the caching strategy, acceptable values are None, ReadWrite, NonStrictReadWrite and ReadOnly.

Constructor Modifier

Specifies the accessibility level of the class constructor. Can accept the following values: Public, ProtectedInternal, Internal, Protected, Private.

Discriminator

A column or formula used to distinguish individual subclasses.

Discriminator value

A value that distinguishes individual subclasses.

Documentation

LongDescription

Detailed description of the class.

Summary

Brief description of the class.

Dynamic Insert

Specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null. Can accept the following values: True or False.

Dynamic Update

Specifies that UPDATE SQL should be generated at runtime and contain only the columns whose values are not null. Can accept the following values: True or False.

Entity Base

The name of the class or interface which is base for this specific class.

Filter

Specifies the filter to be used when retrieving objects of the derived class.

A filter criterion allows you to define a restriction clause similar to the existing "where" attribute available on the class. These filter conditions, however, can be parameterized. The application can then decide at runtime whether certain filters should be enabled and what their parameter values should be. Filters can be used like database views, but they are parameterized inside the application.

In order to use filters, they must first be defined and then attached to the appropriate mapping elements, for details see Filtering Data.

Generate Data Contract Attribute

Specifies that the class defines a data contract and is serializable by a serializer. To make the class serializable, define a data contract for the class. To create a data contract, apply the Generate Data Contract Attribute to the class and apply the Generate Data Member Attribute to any fields or properties that must be serialized.

Join Tables

Specifies additional tables joined to the main tables of the class.

Lazy

Enables or disables lazy fetching. Can accept the following values: Default, True, or False.

Modifier

Specifies the visibility level of the class. Acceptable values are Public or Internal.

Mutable

Specifies whether instances of the class may be updated and deleted. Can accept the following values: True or False.

Name

Name of the entity class.

Namespace

Namespace where the entity class resides.

Optimistic Lock

Determines the optimistic locking strategy. Can accept the following values: Version, None, Dirty, All.

Persister

Custom IClassPersister implementation.

Polymorphism

Determines whether implicit or explicit query polymorphism is used. Can accept the following values: Explicit or Implicit.

Properties

Properties of the class.

Proxy

An interface to use for lazy initializing proxies.

Schema

Schema of the database table.

Select Before Update

Specifies that NHibernate should never perform an SQL UPDATE unless it is certain that an object is actually modified. Can accept the following values: True or False.

Shape Color

The color of objects on the diagram.

Subselect

An SQL query for entity fetching. It is used to define a read-only/immutable entity which is based on the results of an arbitrary native query.

Synchronize Tables

Defines tables that will be affected after executing the SQL query. It is used only if the Subselect query is set for the entity.

Table

Name of the database table.

Where

An arbitrary SQL WHERE condition to be used when retrieving objects of this class.

Misc

Type

Determines the model of inheritance. Acceptable values are: Table Per Type, Table Per Hierarchy, or Table Per Concrete Type.

 


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.