Generated sql:
Hibernate: select hibernate_sequence.nextval from dual
Hibernate: insert into PERSON (name, address, id) values (?, ?, ?)
Everything seems to be working - no errors at all. But my class is not being saved to the database! I get the session, do the save, the flush etc - but no action in the database itself.
Should I not be seeing the actual SQL and not the ? ? ? business? My class is folowing all the right rules (private members, no arg constructor etc
CODE:
Person person1 = new Person();
person1.setName("Basil Fawlty");
person1.setAddress("Fawlty Towers, UK");
try {
Session session = HibernateUtil.currentSession();
session.save(person1);
session.flush();
HibernateUtil.closeSession();
} catch (Exception ex) {
System.out.println("Problem with
servlet code: " + ex.getMessage());
}
help appreciated.