I would like to have Hibernate generate insert and update statements that contain a stored proc call.
For example:
insert into cat (id, name, tag) values ( ?, ? , encrypt(?) )
It looks like a LiteralType is supposed to be able to implement the objectToSQLString method to return "encrypt(?)" instead of "?".
snippet from org.hibernate.sql.Insert
Code:
public Insert addColumn(String columnName, Object value, LiteralType type) throws Exception {
return addColumn( columnName, type.objectToSQLString(value) );
}
However, it does not look like this method is called in the Hibernate code base.
Am I looking at things correctly, or is there something I am missing?