-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Problem with DB PostGreSQL in uppercase DB object name
PostPosted: Wed Jul 20, 2005 11:47 am 
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


Top
  
 
 Post subject:
PostPosted: Wed Jul 20, 2005 12:51 pm 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
A different solution is to use backticks (`) around the field names in the mapping file. Just a wild guess, but maybe this will work.

_________________
Cuyahoga


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 22, 2005 4:40 am 
Ahh.. i try i is work perfectly... Thanx a lot for this suggestion. Because i didn't find it in documentation


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.