I made a small application with Hibernate. only from samples available from the HB site.
Hibernate says DB:
drop table if exists some_db.my_table create table some_db.my_table ...... select max(id) from my_table
when I switch from HSQL database to MySQL.
I have the error "DEBUG ohejdbc.spi.SqlExceptionHelper - You have an error in the SQL syntax, check the manual that matches the version of your MySQL server for the correct syntax to use next to" my_table "on line 1 [n / a]"
because HB is trying hard to say
select max(id) from my_table
instead
select max(id) from some_db.my_table
which is the correct syntax when it comes to
public void testBasicUsage() {
and changing the dialect does not help.
I tried switching to different versions of hb, for example
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.1.6.Final</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.21</version> </dependency>
but that doesn't help either.
change of connection (standard "root" / "access"), for example
jdbc:mysql:
instead
jdbc:mysql:
doesn't help either.
this seems like a mistake, but what would be the solution?
source share