Hi,
I am trying to insert a row into the table using the query below using JOOQ.
create.insertInto(
table("stack_info"),
fieldByName("id"),
fieldByName("user_name"),
fieldByName("time_created"),
fieldByName("product"),
fieldByName("label"),
fieldByName("instance_type"),
fieldByName("status"))
.values(
request.getStackId(),
request.getUserName(),
request.getTimeCreated(),
request.getProduct().toString(),
request.getLabel(),
request.getInstanceType(),
request.getStatus().toString()
).execute();
Running the above query, I get the following error.
Caused by: org.jooq.exception.DataAccessException: SQL [insert into
stack_info ("id", "user_name", "time_created", "product", "label",
"instance_type", "status") values (?, ?, cast(? as timestamp), ?, ?, ?,
?)]; ERROR: column "status" is of type stack_status but expression is of
type character varying
Hint: You will need to rewrite or cast the expression.
Position: 163
stack_status is defined as an ENUM in the DB. It has the following values:-
stack_status :
PENDING,CREATE_COMPLETE,DELETE_IN_PROGRESS,DELETED,DELETE_FAILED
Any pointers, how to fix this ?
Thanks,
Ganesh
--
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.