org.postgresql.util.PSQLException: ERROR: column "feedbackid" does not exist Position: 8
I am getting this error but unable to understand what the reason behind this. It shows:- **
org.postgresql.util.PSQLException: ERROR: column "feedbackid" does not exist Hint: Perhaps you meant to reference the column "feedback.feedbackId". Position: 8
**
Database table in postgres:
create table `company`.`feedback` (
feedbackId
int(10) NOT NULL,
feedbackActionId
int(12) NOT NULL,
description
varchar(200) DEFAULT NULL,
feedbackText
varchar(2000) DEFAULT NULL,
email
varchar(100) NOT NULL,
createdDate
date NOT NULL
);
public Feedback getFeedbackById(int id) throws SQLException, ClassNotFoundException {
conn = DBConnection.setDBConnection();
String sqlQuery = "select feedbackId, feedbackActionId, description, feedbackText, email, createdDate" +
"from feedback " +
" where feedbackId = " + id ;
DBConnection dbConn = new DBConnection();
ResultSet resultSet = dbConn.getResultSet(sqlQuery, conn);
int feedbackId = resultSet.getInt("feedbackId");
int feedbackActionId = resultSet.getInt("feedbackActionId");
String description = resultSet.getString("description");
String feedbackText = resultSet.getString("feedbackText");
String email = resultSet.getString("email");
Date createdDate = resultSet.getDate("createdDate");
feedback = new Feedback(feedbackId, feedbackActionId, description, feedbackText, email, createdDate);
resultSet.close();
return feedback;
}
Thanks in advance.