java - Could not extract ResultSet, Column not exist -
i have entity
@entity @table(name = "ebooking") public class ebooking { @id @column(name = "bookid") private string bookid; and implemented repository llike
public interface ebookingrepository extends jparepository<ebooking, string>, jpaspecificationexecutor<ebooking> { @query("select book ebooking book book.bookid = :id") ebooking getbybookid(@param("id") string id); } when try run method have exception:
org.springframework.dao.invaliddataaccessresourceusageexception: not extract resultset; sql [n/a]; nested exception org.hibernate.exception.sqlgrammarexception: not extract resultset org.postgresql.util.psqlexception: error: column ebooking0_.book_id not exist position: 8 why ebooking0_.book_id? there ebooking table.
thank you!
ebooking0_ alias ebooking table generated hibernate. can check if turn on sql logging.
error indicate don't have column book_id in table ebooking.
Comments
Post a Comment