Closed samuelgoldenbaum closed 13 years ago
Added option to setup NH repository to use DistinctRootEntity transformer.
When configuring ncommon data providers with NHConfiguration you can use the following:
NCommon.Configure.Using(containerAdapter)
.ConfigureData
This is an application wide config, meaning all queries will use the DistinctRootEntity transformer.
Closing this issue.
Think it would be good include a property like "WithDistinctRootEntity" to IRepository.
This would allow us to take advantage of the nhibernate transformers inside the RepositoryQuery:
if(_distinctRootEntity) { query.QueryOptions.RegisterCustomAction(x => x.SetResultTransformer(Transformers.DistinctRootEntity)); }
Any thoughts?