-
Db2hbm is a reverse engineering tool able to generate hbm files from a database schema and some information contained in a configuration file. Unlike other commercial and open source tools serving the same purpose, db2hbm is not template based. The hbm output comes from a serialization based on the NHibernate...
-
(this was originally blogged about here ) One of the things I get a fair bit of use out of is the fluent nHibernate project and the AutoPersistenceModel. If you are not very familiar with fluentNH or AutoPersistenceModel then I would suggest checking out their wiki , as what I am about to discuss, while...
-
I originally blogged about this here and here on my blog but Fabio suggested I add these posts to the Forge, so here I am. I have to say I am a little exited to make my first contribution to the Wiki [H]. I will try to add a bit more to them and show some examples that do not use the TableGenerator class...
-
I'm just starting to get my feet wet with NHibernate and one of the topics that popup here at the bar (you are thinking about NH when you have a couple of cold ones, aren't you? [B] ) was if we could use something like sql server's timestamp column to handle concurrency with NH and Oracle...
-
Sometimes it may be necessary to retrieve a nested component type of a class. NHibernate does not provide any direct solution for this, and the most obvious aproach using a projection does not work. Using regular HQL it is possible to retrieve a component, but in more advanced situations it can be a...
-
Postgresql supports the use of Arrays as a datatype for a column ( documentation ) - if you have a model that can storea List<string> for example, then in some cases its preferable to take advantage of this datatype, rather than requiring a join to a seperate table. This How To shows how you would...
-
In some cases our clients has to use the same database user id in each connection, so they can use audit and security features of their database system (and their DBAs will be happy [:)]). To do that in Nh We can use the ConnectionProvider facility. Just derive a class from the standard DriverConnectionProvider...
-
Sometimes you'd want to map an Enum field to the DB. The default behaviour of NHibernate is to persist the Enum value ToString()'s output to the DB. But at times you'd rather persist a custom value for each enum value. Popular example will be: namespace Model { public enum SexType { Male...