Home  >  Q&A  >  body text

java - mapper.xml is generated through mybatis-generator, but the primary key id prompts an error

<statement> or DELIMITER expected,got 'id'

As shown in the picture, there is an error here, but I don’t understand what it means

Other content is normal, except that the id of the first Base_Column_List has a red underline error

<constructor >
  <idArg column="id" jdbcType="INTEGER" javaType="java.lang.Integer" />
  <arg column="user_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
  <arg column="product_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
  <arg column="quantity" jdbcType="INTEGER" javaType="java.lang.Integer" />
  <arg column="checked" jdbcType="INTEGER" javaType="java.lang.Integer" />
  <arg column="create_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
  <arg column="update_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
</constructor>

  <sql id="Base_Column_List" >
    id, user_id, product_id, quantity, checked, create_time, update_time
  </sql>

The same applies to other automatically generated tables
I don’t know if it is a problem with IntelliJ’s alarm level or if there is really a problem

PHP中文网PHP中文网2667 days ago1974

reply all(2)I'll reply

  • 欧阳克

    欧阳克2017-06-30 09:55:39

    You can test whether it is running normally. If an error is reported during operation, then look for the error. The error prompted by the editor may not necessarily be an error

    reply
    0
  • PHP中文网

    PHP中文网2017-06-30 09:55:39

    intelliJ2017 will report an error like this, but it runs without any problem. It’s just a small bug in intelliJ

    reply
    0
  • Cancelreply