Hibernate allows you to create types and override the fetching/saving metods of the types.
Create a type, e.g., InsertableOnly, which on the fetch sets throws away the database value.
Assuming your value is an Integer because you represent prices in cents to avoid rounding issues:
class InsertOnlyInteger extends org.hibernate.type.IntegerType {
public Object get(ResultSet rs, String name) throws SQLException {
return null;
}
}
Then make the Hibernate type of the attribute InsertOnlyInteger (with xml or annotation, as it suits you).
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
INCLUDE: Use this for the filter to be applied to any include targets matching a specified servlet name or with URLs matching a specified pattern.
FORWARD: Use this for the filter to be applied to any forward targets matching a specified servlet name or with URLs matching a specified pattern.
REQUEST: Use this in addition to an INCLUDE or FORWARD setting (one <dispatcher> element for each setting) for the filter to also be applied to direct request targets matching a specified servlet name or with URLs matching a specified pattern. (It is nonsensical to use the REQUEST value only. If you want the filter to apply only to direct requests, there is no need to use the <dispatcher> element.)
ERROR: Use this for the filter to be applied under the error page mechanism.