HowTo set the collection type factory class

162 views
Skip to first unread message

José F. Romaniello

unread,
Sep 29, 2009, 8:30:03 AM9/29/09
to Fluent NHibernate
How can I set the collection type factory with fluent nhibernate?

Thank you in advance.

Paul Batum

unread,
Oct 6, 2009, 7:22:37 AM10/6/09
to fluent-n...@googlegroups.com
Hi José,

Can you show me how you would do this with a normal nhibernate xml mapping? I haven't heard of this feature before.

Thanks,

Paul Batum

nuffsaid

unread,
Nov 3, 2009, 7:29:09 AM11/3/09
to Fluent NHibernate
Hi Paul (and José),

I'm trying to achieve this too, but no luck so far. It looks like
Fluent NHibernate just skips this property. Here is how you set the
property with regular NHibernate configuration:

NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration();
cfg.Properties[Environment.CollectionTypeFactoryClass] = typeof
(WpfCollectionTypeFactory).AssemblyQualifiedName;

Anyone in here who has any thoughts on this matter?

// Tomas

José F. Romaniello

unread,
Nov 3, 2009, 7:07:40 AM11/3/09
to Fluent NHibernate
Sorry, has been a long time since I do not watch this thread.
I used to configure the collection type factory in nhibernate as
follows:
Configuration.Properties[Environment.CollectionTypeFactoryClass]
= typeof (WpfCollectionTypeFactory).AssemblyQualifiedName;

I've a WPF example "Chinook Media Manager", that use a custom
collection type factory (from unhaddins). I don't use FNH, but a lot
of people say that they cann't set a custom collection type factory
with fluent NH.

They say they can set the collection type factory but then... FNH
ignore this setting.
http://groups.google.com/group/nhusers/browse_thread/thread/90c74beea72517f5/afb13c1b459b3055?lnk=gst&q=collection+type+factory#afb13c1b459b3055
http://jfromaniello.blogspot.com/2009/08/chinook-media-manager-core.html




On 6 oct, 08:22, Paul Batum <paul.ba...@gmail.com> wrote:
> Hi José,
>
> Can you show me how you would do this with a normal nhibernate xml mapping?
> I haven't heard of this feature before.
>
> Thanks,
>
> Paul Batum
>
> On Tue, Sep 29, 2009 at 11:30 PM, José F. Romaniello <jfromanie...@gmail.com
Reply all
Reply to author
Forward
0 new messages