Hey Lukas,

Is it possible to use "NOW()" in an insert function.  For example, the 
insert is to look like this

INSERT INTO db.customer(
  account_number, 
  cancel_date
)
VALUES (
  1, 
  NOW()
)

The Jooq Query will look like 
wrapper.getCreate()
.insertInto(
    CUSTOMER,
    CUSTOMER.ACCOUNT_NUMBER, // int
    CUSTOMER.CANCEL_DATE)    // joda DateTime
.values(
    1,
    SOMETHING); // What should this be
)
.execute();

I use a type converter from Timestamp to DateTime. The problem is that the 
insert is expecting a DateTime object. I could use *new DateTime(), *but I 
want to use the MYSQL server time for this.  The following don't work

   - DSL.val("NOW()")  -> returns a string, type mismatch
   - DSL.field("NOW()", DateTime.class) -> returns a Field<DateTime> which 
   isn't compatible
   
Any ideas?

-- 
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