Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6814615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:42:35+00:00 2026-05-26T20:42:35+00:00

I installed jOOQ into eclipse, generated classes for my mySQL, but I still have

  • 0

I installed jOOQ into eclipse, generated classes for my mySQL, but I still have problems to write also some basic queries.

I tried to compose insert query with returning of generated keys, but compiler throws error

Table: tblCategory
Columns: category_id, parent_id, name, rem, uipos

Result<TblcategoryRecord> result= create.insertInto(Tblcategory.TBLCATEGORY, 
    Tblcategory.PARENT_ID, Tblcategory.NAME, Tblcategory.REM, Tblcategory.UIPOS)
        .values(node.getParentid())
        .values(node.getName())
        .values(node.getRem())
        .values(node.getUipos())
        .returning(Tblcategory.CATEGORY_ID)
        .fetch();

tried also other differnt ways
how to do it right way?

thanks
charis

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:42:36+00:00Added an answer on May 26, 2026 at 8:42 pm

    The syntax you’re using is for inserting multiple records. This is going to insert 4 records, each with one field.

    .values(node.getParentid())
    .values(node.getName())
    .values(node.getRem())
    .values(node.getUipos())
    

    But you declared 4 fields, so that’s not going to work:

    create.insertInto(Tblcategory.TBLCATEGORY, 
      Tblcategory.PARENT_ID, Tblcategory.NAME, Tblcategory.REM, Tblcategory.UIPOS)
    

    What you probably want to do is this:

    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();
    

    Probably, you’re even better off by using

    TblcategoryRecord result =
      // [...]
      .fetchOne();
    

    For more details, consider the manual:

    http://www.jooq.org/doc/2.6/manual/sql-building/sql-statements/insert-statement/

    Or the Javadoc for creating INSERT statements that return values:

    http://www.jooq.org/javadoc/latest/org/jooq/InsertReturningStep.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed subclipse in eclipse, but I get an error message Expected format '3'
I installed GitHub on mac but I don't have installed git on terminal. When
I installed the Processing plugin for Eclipse. it works fine. But then i copied
Installed Tomcat 6 Installed Eclipse + GWT plugin Created GWT project with sample generated
Installed the IronPython tools for VS 2010 but it didn't associate the *.py files
I installed Google Chrome Portable on the user's desktop and have the default homepage
Installed Google App Engine 1.2.5 and Web Toolkit 1.7.1 . However I still get
I installed the plugin for python and it detects the python code, but how
I installed FFMPEG using apt-get. It comes by default compiled with some options: configuration:
I installed mysql on ubuntu server and did not specify password. When I do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.