Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3 b4
Mapping documents: N/A
Code between sessionFactory.openSession() and session.close():
Session session = sessionFactory.openSession();
try {
tx = session.beginTransaction();
session.save(e911);
session.flush();
commit(e911);
} catch (Exception e) {
tx.rollback();
throw new NestedRuntimeException(e);
}
finally {
session.close();
}
Full stack trace of any exception that occurs: N/A
Name and version of the database you are using: Oracle 8.1.7.4
The generated SQL (show_sql=true):
insert into E911 (npa, nxx, line, street_name, street_direction, street_suffix, plec_id, transaction_code, e911_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
Debug level Hibernate log excerpt: N/A
Hello, we have just finished setting up Hibernate and have created a simple test to insert records into a table called E911. The E911 table contains a constraint on a column - plec_id - that does not allow null values. A standard insert with a value in the plec_id works okay, but when we try to insert with a null value in place of the attribute, we DON'T seem to be getting an Exception as expected. In the logs, we can see that a SQLException was found, but for some reason, the code (as seen above) for which we are saving the transaction processes all the way through and no exception is caught.
Has anyone encountered this problem? Is there something we are missing in the configuration? Any assistance will be greatly appreciated.
Thanks,
Tommy