NHibernate INotifyPropertyChanged Collection - nhibernate

What is the best way of getting INotifyPropertyChanged in my NHibernate Domain Objects' Collections?

Check this:
http://ayende.com/Blog/archive/2009/08/07/nhibernate-amp-inotifypropertychanged.aspx
Ayende is one of the nHibernate contributors

Managed to find a ready to use library which implements these. THanks go to Happy Nomad(Adrian Alexander).
Happy Nomad: Collections for WPF and NHibernate

Related

NHibernate mapping by code + polymorphism

I use NH 3.2 and Mapping by code in my project.
Today I try to set explicit polymorphism to some entities, but can't find how?
I know how to set it in .hbm or FNH, but not in Mapping by code!
Anybody can help me out?
I believe you are correct; explicit polymorphism setting from mapping-by-code has not been implemented yet.
If this is important to you, open a jira issue at http://nhibernate.jira.com

Fluent nHibernate, ToManyBase, Generic usage

I have discovered the method T Generic() in the abstract class ToManyBase<T, TChild, TRelationshipAttributes> but I cannot find any documentation or examples of how this is used, or what it does. Can anyone enlighten me a bit?
Nothing of significance.
It's the equivalent of the NHibernate generic= attribute, which is simply away of explicitly specifying that a collection is a generic one. A holdover from NHibernate's pre-generic days.

nhibernate automapping with union-subclass option

I want to (auto)map a base class and its derived class to two different tables, as described here by ayende (unioned subclasses).
however, according to fluent nHibernate's documentation, I don't see a way do do that.
the property in IAutoMappingOverride they refer to is "IsDiscriminated", but that only difrrentiates between table-per-heirarchy and table-per-subclass.
Is it possible that automapping doesn't support unioned subclasses? and if so- can anyone suggest a workaround?
thanks,
Jhonny

Equivalent for IDbSet<T> in Fluent NHibernate?

Hey there, I've started to play around with Fluent NHibernate and now I want to could do something like IDbSet<T> like I could in EF Code First.. However I cant find any equivalent interface?
Thanks in adavance!
In NHibernate you operate with entities through the ISession interface (reference docs with example). You may wrap the session in a repository if you want (example: Sharp Architecture repository)

Nhibernate Extension points

I'm looking for more information on the extension points within NHibernate.
For instance I know about IUserType and ICacheProvider. However I can't seem to find a good reference of all the different extension points that NHibernate provides?
Is anyone's Google-fu stronger than mine :)
There are no complete references on that... but it's not hard to look at the assembly and find the interfaces and base classes:
IInterceptor
IBatcherFactory
ICollectionTypeFactory
IProxyFactoryFactory
ICacheProvider
IConnectionProvider
ICurrentSessionContext
Dialect
IDriver
IIdentifierGenerator
ITuplizer
And many more...
Take a look at *EventListener (newer mechanism) and IInterceptor (older mechanism, but useful in certain scenarios that EventListeners don't cover). They will get you a long way WRT extending/integrating with NHibernate.
http://www.nhforge.org/doc/nh/en/index.html#events