Is there an easy way in Hibernate to support fields whose type is Object but whose in-application values will be one of the boxed primitive types (e.g. Integer, Float, etc.), Date or String? In other words, can I have the following class persisted somehow:
Code:
public class Field {
@Id
Long id;
Object value;
}
In table format, I figured it would be something like:
Code:
CREATE TABLE FIELD (id bigint, fieldlong bigint, fieldint integer, fieldts timestamp, fieldfloat double precision, fieldstr varchar2);