Hi!

Downloaded 3.5. But I am running into problems with my binding.

As I said, we're using Joda's DateTime as Java object class for DATE and 
TIMESTAMP. In 3.4 we used a simple converter (<Timestamp, DateTime>) for 
that, combined with setting "<dateAsTimestamp>true</dateAsTimestamp>" in 
the xml.

Now I tried to do the same with a binding which uses the old converter:

public class DateTimeBinding
>       implements Binding<Timestamp, DateTime> {
> ....
>   /** The converter. */
>   private DateTimeConverter converter = new DateTimeConverter( );
>
>   /**
>    * @see org.jooq.Binding<java.sql.Timestamp, 
> org.joda.time.DateTime>#converter()
>    */
>   @Override
>   public Converter<Timestamp, DateTime> converter( ) {
>     return converter;
>   }
> .....


Then in my settings:

       <customTypes>
>         <customType>
>           <name>JodaDateTime</name>
>           <type>org.joda.time.DateTime</type>
>           
> <binding>com.ge.med.medora.fiber.dbaccess.DateTimeBinding</binding>
>         </customType>
>       </customTypes>
> ....
>         <forcedType>
>           <name>JodaDateTime</name>
>           <types>DATE|TIMESTAMP.*</types>
>         </forcedType>



During compilation I run into errors. The generator generated something 
like:


public final 
> org.jooq.TableField<.....tables.records.PatientRegistrationRecord, 
> org.joda.time.DateTime> PTRG_ARRIVAL_DATE = 
> createField("PTRG_ARRIVAL_DATE", 
> org.jooq.impl.SQLDataType.DATE.nullable(false), this, "", new 
> ..........DateTimeBinding());


which doesn't compile.

Previously the converter created:

public final 
> org.jooq.TableField<.....tables.records.PatientRegistrationRecord, 
> org.joda.time.DateTime> PTRG_ARRIVAL_DATE = 
> createField("PTRG_ARRIVAL_DATE", org.jooq.impl.SQLDataType.TIMESTAMP, this, 
> "", new .....DateTimeConverter());


which did compile.

Can you spot what's going wrong?

Thanks,

Sascha

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to