JPA.em("default").createQuery("insert into USER (FULLNAME, EMAIL, USERNAME, PASSWORD) " + " VALUES (\'"+fullname+"\',\'"+email+"\',\'"+username+"\',\'"+password+"\');");
这是一个错误的查询吗?我收到此错误:
[IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: VALUES near line 1, column 57 [insert into USER (FULLNAME, EMAIL, USERNAME, PASSWORD) VALUES ('Doniyor','ikbola-86@bk.ru','jurabayev','er');]]
我不知道为什么会这样,查询字符串实际上是可以的,对吧?
将不胜感激任何帮助!
谢谢