used
create-drop to create schema.
run in Dev with
updatethen when try to use
validate I get:
Code:
Caused by: org.hibernate.HibernateException: Wrong column type in xxxmanager.xxx for column in_quarantine. Found: bit, expected: boolean
at org.hibernate.mapping.Table.validateColumns(Table.java:282)
<persistence-unit name="xxxDatasource">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/datasources/xxxDatasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.hbm2ddl.auto" value="validate" /> <!-- create-drop update -->
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<!-- These are the default for JBoss EJB3, but not for HEM: -->
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<property name="jboss.entity.manager.factory.jndi.name"
value="java:/xxxmanagerEntityManagerFactories" />
</properties>
</persistence-unit>
This is the Entity bit...
Code:
@XmlAttribute
@Column(name = "in_quarantine")
private boolean inQuarantine;
DB is:MySQL 5.6.10 running on localhost
What was created on DB was:
in_quarentine tinyint(1)
Since Validate fails I cannot run up.
I am using JBoss 7.1.1.Final
Code:
10:27:53,116 INFO [org.hibernate.annotations.common.Version] (MSC service thread 1-4) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
10:27:53,123 INFO [org.hibernate.Version] (MSC service thread 1-4) HHH000412: Hibernate Core {4.0.1.Final}
...
10:27:53,841 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-4) Hibernate Validator 4.2.0.Final
I will stick with Update for now.
Hope this helps.