Table of Contents

Class NHExpander

Namespace
Breeze.Persistence.NH
Assembly
Breeze.Persistence.NH.dll

Initializes Hibernate proxies and collections prior to serialization. This is used to implement the OData $expand operation.

Be sure to set the default_batch_fetch_size property in your NH config file (or Web.config), e.g.

<property name="default_batch_fetch_size">32</property>

so that lazy loading happens in batches, instead of one at a time.

public class NHExpander
Inheritance
NHExpander
Inherited Members

Methods

InitializeList(IEnumerable, IEnumerable<string>)

Cause initialization of properties on the objects in the collection. The properties to initialize are specified in the expandPaths. For example, if roots is a collection of Orders, expandPaths might be [ "Customer", "OrderDetails/Product/Supplier" ]

public static void InitializeList(IEnumerable roots, IEnumerable<string> expandPaths)

Parameters

roots IEnumerable

Collection of Hibernate-mapped objects

expandPaths IEnumerable<string>

properties relative to the roots