Hibernate 3.1.2's DerbyDialect seems to work around some issues in Derby's JDBC 3.0 Support, but it's not clearly documented in the Javadoc why it is the case.
Derby does support Identity columns (http://db.apache.org/derby/docs/10.1/ref/rrefidentityvallocal.html) and it looks like the Dialect includes this, but then it uses the TableHiLoGenerator instead of the IdentityGenerator.
I assume it's to work around this problem:
but I can't say for certain.
I've created a JIRA on Derby: https://issues.apache.org/jira/browse/DERBY-1518 for the preparedStatement issue highlighted here, with the assumption that this is the reason.
Hibernate 3.1.2, Derby 10.1.2.1