-->
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.  [ 5 posts ] 
Author Message
 Post subject: hibernate.default_schema set to dbo does not work
PostPosted: Fri Jan 30, 2004 3:20 pm 
Newbie

Joined: Fri Jan 30, 2004 2:46 pm
Posts: 1
I have a problem with the Hibernate config XML. I specify for the schema to default to dbo with
<property name="hibernate.default_schema">dbo</property>

It works fine when reading the tables but if the table does not exist, when Hibernate Creates the table, it always creates the table under the owner I log in with.

ie.
--Hibernate config --

<property name="hibernate.connection.username">xxUserName</property>
<property name="hibernate.connection.password">xxPassword</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.default_schema">dbo</property>


--
When I access a table that does not exist the table is created as xxUserName.tableName and not what I would expect as dbo.tableName.

Yes-I do have dbo privlages with the xxUserName.

My db is SQLServer 2000.

What could be the problem?

Thanks in advance for your time.

JDK


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2004 7:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Currently the default-schema setting is completely ignored by SchemaExport. I have a Test case to reproduce and a proposed fix, I will submit to JIRA as soon as I can get CVS to work again (Eclipse breaks with current Sourceforge CVS version :( )


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 7:44 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
gloeglm wrote:
Eclipse breaks with current Sourceforge CVS version :(

I noticed that too, it sucks

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 9:08 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
There are binary and source patches for non-3.0 Eclipse versions here https://bugs.eclipse.org/bugs/show_bug.cgi?id=46655. For 3.0 you most likely will have to use a nightly build or something.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 03, 2004 12:05 pm 
Beginner
Beginner

Joined: Tue Sep 21, 2004 4:04 pm
Posts: 25
Location: Oldsmar, FL
Michael,

In JIRA HB-819 http://opensource.atlassian.com/projects/hibernate/browse/HB-819?page=all
you say you fixed this once, do you still have the fix?

This is causing me problems with SQL Server, I can't use SchemaExport to create the tables. I have to generate a script then use SQl Query Analyzer to run the script, a real pain.

I also see that HB-819 was recently changed from a Bug[1] to Improvement [ 4 ]. IMHO, this issue should have a higher priority as it effectively prevents using SchemaExport with SQL Server. With SQL Server you need to have your tables owned by 'dbo'.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.