When trying to map a custom type using NHibernate, you have to decide whether to implement IUserType or ICompositeUserType. IUserType is slightly simpler to implement but doesn't support using HQL for the custom types underlying properties. To use the power of HQL, you'll need to implement ICompositeUserType. I have an generic example here.
Using this interface you can use the underlying properties within your custom type in the HQL ... very cool.
The greates benefit of using these interfaces in lieu of writing code within the classes themselves to do some kind of transform into the custom type is Separation of Concerns...the Domain shouldn't be required to perform ad hoc methods to accomodate an OR/M's limitations. Fortunately, NHibernate rocks and provides tons of hooks to support the domain!
References
- Hibernate in Action (Bauer,King) ~ pp. 202-208