title: org.springframework.jdbc.BadSqlGrammarException: bad SQL grammar
body: <p>I am getting the following error in my code:</p>
  
  <pre><code>org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad 
  SQL grammar [insert into bulletins (date, name, subject, note, approved) values 
  (?, ?, ?, ?, ?)]; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxError 
  Exception: Unknown column 'date' in 'field list'
  </code></pre>
  
  <p>This line is in my Spring controller.</p>
  
  <pre><code>bulletinDAO.writeBulletin(bulletin);
  </code></pre>
  
  <p>The actual place in my DAO class where I'm trying to write using Hibernate.</p>
  
  <pre><code>public void writeBulletin(Bulletin bulletin) {
      try {
          Session session = sessionFactory.openSession();
          Transaction tx = session.beginTransaction();
          session.save(bulletin);
          tx.commit();
      } catch (Exception e) {
          System.out.println(e.toString());
      }
  }
  </code></pre>
  
  <p>Here is my model class.</p>
  
  <pre><code>    @Entity
      @Table(name="login")
      public class Bulletin {
          @Id
          @Column(name="id")
          @GeneratedValue
          private int id;
  
          @Column(name="bulletin_date")
          private String date;
  
          @Column(name="name")
          private String name;
  
          @Column(name="subject")
          private String subject;
  
          @Column(name="note")
          private String note;
  
          @Column(name="approved")
          private boolean approved;
  
          // Getters and setters follow
  }
  </code></pre>
  
  <p>Finally, here is the layout of the table.</p>
  
  <pre><code>+---------------+---------------+------+-----+---------+----------------+
  | Field         | Type          | Null | Key | Default | Extra          |
  +---------------+---------------+------+-----+---------+----------------+
  | id            | int(11)       | NO   | PRI | NULL    | auto_increment |
  | bulletin_date | varchar(10)   | YES  |     | NULL    |                |
  | name          | varchar(30)   | YES  |     | NULL    |                |
  | subject       | varchar(50)   | YES  |     | NULL    |                |
  | note          | varchar(2500) | YES  |     | NULL    |                |
  | approved      | tinyint(1)    | YES  |     | NULL    |                |
  +---------------+---------------+------+-----+---------+----------------+
  </code></pre>