错误原因是:实体类数据库的名称都为order 和sql 关键字冲突了
这是我的报错信息
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 order0_ limit 10’ at line 1
失败写法:select o.id as OrderId,o.createTime as OrderCreateTime,o.type as OrderType,o.cashAmount as OrderCashAmount,o.customer.id as OrderCustomerId from Order o
正确的写法:
select o.id as OrderId,o.createTime as OrderCreateTime,o.type as OrderType,o.cashAmount as OrderCashAmount,o.customer.id as OrderCustomerId from Orders o