compositeusertype

NHibernate CompositeUserType: How to specify Sql Types?

Using NH 2.0, I have a custom type. It is composed of four properties, so I implemented ICompositeUserType. I want to specify length and precision for the string and decimal properties within the user type, to avoid specifying it with every usage in the mapping files. But there is only a PropertyTypes property to implement, which retu...

NHibernate mapping: UserTypes with many-to-one

New to NHibernate and learning it as we are modifying an existing solution to use this ORM. Ideally, the storage structure and object classes need to stay the same, so Ive come across one or two mapping problems. One class 'Money' has a value and currency. The value is a double and the currency is a foreign key to a list table of curren...

Map database column1, column2, columnN to a collection of elements

In legacy database tables we have numbered columns like C1, C2, C3, C100 or M1, M2, M3, M100. This columns represent BLOB data. It is not possible to change anything it this database. By using JPA Embeddable we map all of the columns to single fields. And then during embedding we override names by using 100 override annotations. Recen...

How do you compare using .NET types in an NHibernate ICriteria query for an ICompositeUserType?

I have an answered StackOverflow question about how to combine to legacy CHAR database date and time fields into one .NET DateTime property in my POCO here (thanks much Berryl!). Now i am trying to get a custom ICritera query to work against that very DateTime property to no avail. here's my query: ICriteria criteria = Session.Cr...

NHibernate ICompositeType Implementation for Uri

Is there any ICompositeType implementation for System.Uri? I want to be able to use this query: where a.Uri.schema == 'https'. ...

Selecting CompostiteUserTypes with Linq To nHibernate (v1)

Hi, We've a mature nHibernate project that has started using the linq provider in nHibernate contrib. As we are using nHibernate 2.0 we can't use the new provider under development in the trunk (against nHibernate 3.0). Whilst limited it's proved to be a perfect for our needs apart from one issue - whenever I select a CompositeUserType...