Yesterday i find problem when i try to use NHibernate to connect PostGreSQL DB. I use Npgsql driver_class for access DB. But if i use some character in DB object (table or column) name UPPERCASE i have proble to use HQL. Problem is to use cout.
Solution for it is only add condition in NHibernate.Mapping.Column in line 118. Add this code:
if (d.GetType() == typeof(NHibernate.Dialect.PostgreSQLDialect))
{
return ( new Alias( null )).ToUnquotedAliasString( name, d );
}
before line
if( name.Length < 11 )
And this is all and every proble with PostGreSQL is solved.
I hope that is help full for someone which use NHibernate for PostGreSQL
Jiri Marvan
|