这里通过 spring jpa 设计数据的时候,处理问题,问题如下
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException:
Unable to execute schema management to JDBC target
[create table order (id integer not null, order_time datetime, shop_id integer not null auto_increment, customer_id integer not null, car_id integer not null, primary key (shop_id, id, customer_id, car_id))]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near
'order (id integer not null, order_time datetime, shop_id integer not null auto_i' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Order (id integer not null, orderTime datetime, car_id integer, customer_id inte' at line 1
看一下,可能数据哭的版本问题,或者是建立表的结构有问题,但是,一般人,都会先怀疑,是自己的pojo 映射表出现问题,
后来,测试,最简单的pojo还是有问题,于是,就怀疑是数据库的版本有问题,于是,我换了一个pojo的类名称,ok,搞定
之前,使用的是Order ,后来,改为 Item ,可能是数据库,把这个作为,一个系统的文件,不让改.所以....