I have Class CustomDate and that is referred in other class called Test.
public class CustomDate{
public String toString(){
return "20100829"
}
}
public class Test{
CustomDate date;
}
In Mapping file of Test
<property name="date" COLUMN="DATE">
I want to save only long value and type should be long type and i should not save date object and string value.long value will be this like:"20100829" actual date:29-08-2010. Because in feature if want compare dates in sql it may create problem, if it is long value, sql compare queries will fine. Do we have any way do it in Hibernate?