The syntax you use is for inserting multiple records. This will insert 4 records, each with one field.
.values(node.getParentid()) .values(node.getName()) .values(node.getRem()) .values(node.getUipos())
But you declared 4 fields in order not to work:
create.insertInto(Tblcategory.TBLCATEGORY, Tblcategory.PARENT_ID, Tblcategory.NAME, Tblcategory.REM, Tblcategory.UIPOS)
What you probably want to do is the following:
Result<TblcategoryRecord> result = create .insertInto(Tblcategory.TBLCATEGORY, Tblcategory.PARENT_ID, Tblcategory.NAME, Tblcategory.REM, Tblcategory.UIPOS) .values(node.getParentid(), node.getName(), node.getRem(), node.getUipos()) .returning(Tblcategory.CATEGORY_ID) .fetch();
Or alternatively:
Result<TblcategoryRecord> result = create .insertInto(Tblcategory.TBLCATEGORY) .set(Tblcategory.PARENT_ID, node.getParentid()) .set(Tblcategory.NAME, node.getName()) .set(Tblcategory.REM, node.getRem()) .set(Tblcategory.UIPOS, node.getUipos()) .returning(Tblcategory.CATEGORY_ID) .fetch();
Perhaps you are even better off using
TblcategoryRecord result =
See manual for more details:
http://www.jooq.org/doc/2.6/manual/sql-building/sql-statements/insert-statement/
Or Javadoc to create INSERT that return values:
http://www.jooq.org/javadoc/latest/org/jooq/InsertReturningStep.html