Home

Castle Stronghold

ActiveRecordAttribute API Document

Associate meta information related to the desired table mapping.

Quick Note

If no table is specified, the class name is used as table name

Example


[ActiveRecord("tb_Order")]
public class Order : ActiveRecordBase
{
}

Constructors

ActiveRecordAttribute()

Uses the class name as table name

ActiveRecordAttribute(String table)

Associates the specified table with the target type

ParameterDescription
table

ActiveRecordAttribute(String table, String schema)

Associates the specified table and schema with the target type

ParameterDescription
table Missing documentation
schema Missing documentation

Properties

NameTypeDescription
TableString Gets or sets the table name associated with the type
SchemaString Gets or sets the schema name associated with the type
ProxyType Associates a proxy type with the target type
DiscriminatorColumnString Gets or sets the Discriminator column for a table inheritance modeling
DiscriminatorTypeString Gets or sets the column type (like string or integer) for the discriminator column
DiscriminatorValueString Gets or sets the value that represents the target class on the discriminator column
WhereString SQL condition to retrieve objects
LazyBoolean Enable lazy loading for the type
DynamicUpdateBoolean From NHibernate documentation: Specifies that UPDATE SQL should be generated at runtime and contain only those columns whose values have changed.
DynamicInsertBoolean From NHibernate documentation: Specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null.
PersisterType From NHibernate documentation: Specifies a custom NHibernate.Persister.IClassPersister.
SelectBeforeUpdateBoolean From NHibernate documentation: Specifies that NHibernate should never perform an SQL UPDATE unless it is certain that an object is actually modified. In certain cases (actually, only when a transient object has been associated with a new session using update()), this means that NHibernate will perform an extra SQL SELECT to determine if an UPDATE is actually required.
PolymorphismPolymorphism From NHibernate documentation: Determines whether implicit or explicit query polymorphism is used.
MutableBoolean From NHibernate documentation: Specifies that instances of the class are (not) mutable.
BatchSizeInt32 From NHibernate documentation: Specify a "batch size" for fetching instances of this class by identifier.
LockingOptimisticLocking From NHibernate documentation: Determines the optimistic locking strategy.
UseAutoImportBoolean From NHibernate documentation: The auto-import attribute lets us use unqualified class names in the query language, by default. The assembly and namespace attributes specify the assembly where persistent classes are located and the namespace they are declared in.
CacheCacheEnum Gets or sets the cache strategy to use for this property
AccessPropertyAccess Gets or sets the access strategy for this property
CustomAccessString Gets or sets the custom access strategy
AccessStringString Gets the access strategy string for NHibernate's mapping.

Google
Search WWW Search castleproject.org