您的sql语法有错误;请查看与mysql服务器版本相对应的手册,在第1行的“order(id)”附近使用正确的语法

不知道为什么。有人能帮忙吗?

以下是实体。订单可以有很多产品。产品可以关联到多个订单,而餐厅与产品有一对一的关系

@Entity

public class Order {

@GeneratedValue(strategy = GenerationType.IDENTITY)

private int id;

@ManyToMany

@JoinTable(name = "order_product", joinColumns = @JoinColumn(name = "order_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "product_id", referencedColumnName = "id"))

private Set products = new HashSet<>();

@Entity

public class Product {

@GeneratedValue(strategy = GenerationType.IDENTITY)

private int id;

@ManyToOne

@JoinColumn(name = "restaurant_id", referencedC

我有个错误。您的sql语法有错误;请查看与mysql服务器版本相对应的手册,在第1行的“order(id)”附近使用正确的语法不知道为什么。有人能帮忙吗?以下是实体。订单可以有很多产品。产品可以关联到多个订单,而餐厅与产品有一对一的关系@Entitypublic class Order {@Id@GeneratedValue(strategy = GenerationType.IDENTITY)p... 2 异常堆栈信息 Caused by: com. mysql .jdbc. exception s.jdbc4. MySQL SyntaxError Exception : Access denied for user ''@'localhost' to database 'hibernate' at sun.reflect.NativeConstructorAccessorImpl.new Table ‘zup.Domain_System’ doesn’t exist ### The error occurred while setting parameters ### SQL : SELECT * FROM Domain_System WHERE domain = ? LIMIT 1 ### Cause: com. mysql .jdbc. exception s.jdbc4. MySQL SyntaxError Exception : Table 'zup.Domain_System' doesn't exist ; bad SQL grammar []; nested
jdbc连接数据库操作进行查询语句操作时出现 错误 : com. mysql .jdbc. exception s. MySQL SyntaxError Exception :。。。 原因可能是:1.数据库操作语句写错,可以用数据库其他工具查出结果在复制到jdbc连接数据库查询中。 2.若数据库语句没有问题,出现: com. mysql .jdbc. exception s. MySQL SyntaxError Exception ...
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
错误 报告: com. mysql .jdbc. exception s.jdbc4. MySQL SyntaxError Exception : 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 ‘1=1’ at line 1 您的 SQL 语法 错误 ;检查与 MySQL 服务器 版本 相对 手册 ,以找到在“*”附近使
java. sql . SQL SyntaxError Exception : 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 ‘.expend_project, 中文翻译: 您的 SQL 语法 有...
com. mysql .jdbc. exception s.jdbc4. mysql syntaxerror exception : you have an error in your sql syntax; che