Hi,

I tried your code example in the manual to inline sequence value fetches:

create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
      .values(S_AUTHOR_ID.nextval(), "William", "Shakespeare");

Unfortunately I don't get it compiled (Version 3.1.0).

The reason is that 
org.jooq.impl.DefaultDSLContext.insertInto(Table<R>, Field<T1>, Field<T2>, 
Field<T3>, ... and friends)
return

InsertValuesStep1-22

And that InsertValuesStep Interface has no values(Object ...) Method.

So you cannot mix Fields and Values in Insert-Statement - Values.

On the other hand InsertSetStep and InsertValuesStepN have this method.

Is this a bug (missing feature) or am I missing something?

A workaround exists with Arrays.asList: 

create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
      .values(Arrays.asList(S_AUTHOR_ID.nextval(), "William", "Shakespeare"));


Cheers
Rick

-- 
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/groups/opt_out.

Reply via email to