<name/> आपके <customType/> . का तत्व <U> . का संदर्भ लेना चाहिए अपने Converter<T, U>
, को नहीं <T> प्रकार (डेटाबेस प्रकार)। तो अगर आप इसे लिखते हैं:
<customTypes>
<customType>
<name>java.sql.Timestamp</name>
<converter>com.plannow.jooq.converters.DateTimeConverter</converter>
</customType>
</customTypes>
तब आप वास्तव में सिर्फ एक Converter<Timestamp, Timestamp> . को पंजीकृत कर रहे हैं . इसके बजाय इसे आजमाएं:
<customTypes>
<customType>
<name>org.joda.time.DateTime</name>
<converter>com.plannow.jooq.converters.DateTimeConverter</converter>
</customType>
</customTypes>
ध्यान दें कि आपके कन्वर्टर को null . को भी सही तरीके से हैंडल करना चाहिए मान:
@Override
public DateTime from(Timestamp t) {
return t == null ? null : new DateTime(t);
}
@Override
public Timestamp to(DateTime u) {
return u == null ? null : new Timestamp(u.getMillis());
}