Comments - Hibernate Reverse Engineering wizard with MariaDB

9 years, 4 months ago John Gibson

I ran into this as well and figured it out. The problem lies in the JDBC driver for MariaDB and the Hibernate Tools. If you crank up Hibernate's logging you'll see messages like this:

2014-12-03 21:16:00,214 [main] DEBUG reveng.JDBCReader - Ignoring table locations of type BASE TABLE

This is because the MariaDB JDBC driver was reporting the types of the table as BASE TABLE, however Hibernate Tools will only generate reverse engineered files for database objects of type TABLE or VIEW.

From Hibernate Tools 4.3.1.CR1: org.hibernate.cfg.reveng.JDBCReader#processTables():

if ( ("TABLE".equalsIgnoreCase(tableType) || "VIEW".equalsIgnoreCase(tableType) /*|| "SYNONYM".equals(tableType) */) ) { //||
...
} else {
  log.debug("Ignoring table " + tableName + " of type " + tableType);
}

To work around it I just used the legacy MySQL JDBC driver to do the reverse engineering and then switched to the MariaDB driver for actual usage.

 
9 years, 4 months ago John Donaldson

Well done John G. In the event, plans changed and I gave up trying to do the migration.

John D.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.