I am getting the following error:
Code:
java.lang.NumberFormatException: For input string: "approved"
The problem is that the approved column is a boolean in my database, or so I believe. Here is how I have it defined.
Code:
+----------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+----------------+
| approved | tinyint(4) | YES | | NULL | |
+----------+---------------+------+-----+---------+----------------+
This is the line in my code where I'm defining the call to the database.
Code:
Query myQuery = session.createSQLQuery("select * from bulletins where approved = true");
Here is how I have it defined in my model class.
Code:
@Column(name="approved")
private boolean approved;
I've tried printing out the list in my controller class, and I get the following error.
Code:
[Ljava.lang.Object; cannot be cast to com.model.Bulletin