-->
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: Tables are not created when using @Table
PostPosted: Fri Oct 06, 2006 11:04 am 
Newbie

Joined: Fri Oct 06, 2006 10:52 am
Posts: 8
I'm using the latest Hibernate with MySQL and I have an entity specified with:

@Table(name="account", schema="identity")

I have property name="hibernate.hbm2ddl.auto" value="create-drop"

Hibernate will not create the account table. If I comment out @Table, the table is created just fine. Is this a bug?

Bryan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 06, 2006 12:15 pm 
Newbie

Joined: Thu Oct 05, 2006 11:34 am
Posts: 8
Try using property name = "hibernate.hbm2ddl.auto" value = "update" instead.
With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly.

_________________
.::hIBERNATe rOCKs::.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 06, 2006 12:55 pm 
Newbie

Joined: Fri Oct 06, 2006 10:52 am
Posts: 8
Using "update" gives the same result. Changing @Table(name="account", schema="identity") to @Table(name="account") works. I'm guessing it's a problem with Hibernate and MySQL not using schemas. I need to specify the schema as the code will ultimately run on DB2.

Bryan


Top
 Profile  
 
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.