-->
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: Is hbm2ddl=validate works in any situation?
PostPosted: Wed May 25, 2011 8:45 pm 
Newbie

Joined: Sat Mar 06, 2010 1:19 pm
Posts: 8
I have a project using multi-tenant with one database per tenant. So, I have a hard job to maintain these databases up-to-date. I discovered some days ago that the hbm2dll property set to "validate" will thrown an exception if the database schema is different than hibernate entities.

However, I'm facing some problems using this property. For example, this column:

@Column(columnDefinition="TINYINT(1) default 0")
private int importance;

When the Hibernate is set to "update" it creates a column:
importance tinyint(1) default 0

However, the "validate" throwed an exception:

Exception in thread "main" org.hibernate.HibernateException: Wrong column type in xxxxx.table_name for column importance. Found: bit, expected: TINYINT(1) default 0

Is hbm2dll=validate reliable?


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.