Configuration

This page of the Model Settings dialog box is intended for customizing NHibernate configuration. I.e. here you can set parameters for NHibernate configuration and specify the location of its storage: either in App.Config (Web.Config), or in a separate file (cfg.xml), or you can choose Entity Developer not to do anything concerning configuration.

Save configuration in App.Config

This radio button defines that configuration should be saved in the app.config file.

Save configuration in separate <Model Name>.cfg.xml file

This radio button defines that configuration should be saved in a separate file (cfg.xml).

Not to save the configuration

This radio button defines that configuration should not be saved.

Configuration

Driver Class

The class name of a custom IDriver implementation.

Dialect Class

The class name of a custom dialect implementation.

Proxy Factory

The Bytecode Generator NHibernate will use for proxying.

Generate Statistics

If enabled, NHibernate will collect statistics useful for performance tuning.

Max Fetch Depth

Sets the maximum "depth" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). "0" value disables default outer join fetching.

Default Batch Fetch Size

Sets the default size for NHibernate batch fetching of associations. Recommended values are 4, 8, 16.

Default Entity Mode

Sets the default mode for entity representation for all sessions opened from this SessionFactory.

Default Catalog

Qualifies unqualified table names with the given catalog in generated SQL.

Default Schema

Qualifies unqualified table names with the given schema/tablespace in generated SQL.

Show SQL

Writes all SQL statements to console.

Format SQL

Pretty-prints the SQL in the log and console.

Use Outer-Join

Enables outer-join fetching.

Use Proxy Validator

Enables or disables validation of interfaces or classes specified as proxies. Default value is Enabled.

Transaction Factory Class

The class name of a custom ITransactionFactory implementation, by default is equal to the built-in AdoNetTransactionFactory.

Use SQL Comments

If turned on, NHibernate will generate comments inside the SQL for easier debugging. Default value is False.

Query Substitutions

Is used to map from tokens in NHibernate queries to SQL tokens (tokens may be function or literal names, for example).

NHibernate Cache

Cache Provider Class

The class name of a custom ICacheProvider implementation.

Query Cache Factory

The lass name of a custom IQueryCacheFactory, interface. By default is equal to the built-in StandardQueryCacheFactory.

Cache Region Prefix

A prefix to be used for second-level cache region names.

Use Second-Level Cache

Can be used to completely disable the second level cache, which is enabled by default for classes specifying <cache> mapping.

Use Minimal Puts

Optimizes second-level cache operation to minimize writes at the cost of more frequent reads (useful for clustered caches).

Use Query Cache

Enables the query cache, individual queries still have to be set cacheable.

 


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.