-->
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.  [ 1 post ] 
Author Message
 Post subject: Problems with table schema when NHibernate to MySQL, help!
PostPosted: Tue Oct 02, 2007 5:40 am 
Newbie

Joined: Tue Oct 02, 2007 5:29 am
Posts: 1
The version is 1.20 GA.

I was moving my database from MSSQL to MYSQL, while the generated SQL reminds me cannot find table "dbo.countries" where countries is one of my table.

I have no idea which schema name shall i put infront of my table name, since in MYSQL i cannot find this info. So i tried to change the NHibernate config file

Code:
<config>
         
      <add key="hibernate.connection.driver_class" value="NHibernate.Driver.MySqlDataDriver"/>


      <add key="hibernate.dialect" value="NHibernate.Dialect.MySQLDialect"/>
     
      <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
         <add key="hibernate.connection.connection_string" value="ConnectionString = ${HotelPortal}"/>
      <add key="hibernate.default_schema" value="abc" />
      </config>


and hope this will change the generated sql to select data from abc.countries. While the result is, the generated sql still looking for dbo.countries and the "hibernate.default_schema" seems has no effect.

Since i was using Castle AR on top of NHibernate, so i don't have the mapping file here. While i already removed all "shema" attributes from my
AR classes, so i thought it should use the default_schema when generating the SQL.

can anyone advise me? really thanx a lot!


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

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.