Hi to everybody!
I have a very strange problem!
I create my annotation type for fuzzy date (i change every field that is a single date with this type, so in the db every date is rappresented by two extreme).
For problem with XML generation, i use this annotation in the hbm.xml file in this way:
Code:
<property name="date" type="FDHibernateType" node="date">
<column name = "date_fz_fr"/>
<column name = "date_fz_to"/>
</property>
If i use my entity everything gone right, but if i try to update the schema i have a problem, this is the code that permit the update of the schema:
Code:
AnnotationConfiguration privateConfig = new AnnotationConfiguration();
privateConfig.setNamingStrategy(new HibernateNamingStrategy());
privateConfig.setProperties(HibernateUtil.getConfiguration().getProperties());
Class cls = (TestFDate2Entity.class);
if (cls.isAnnotationPresent(Entity.class))
privateConfig.addAnnotatedClass(cls);
else
privateConfig.addClass(cls);
SchemaUpdate su = new SchemaUpdate(privateConfig);
su.execute(true, false);
but in the column data is type raw and he don't create the two column date_fz_to and date_fz_fr.
Someone can help me? If something is not clear (very probably) pls ask me details!
Best Regards
N@ruto