flypangzhi commented on issue #5173: UUID is configured, but SNOWFLAKE is used
URL: 
https://github.com/apache/incubator-shardingsphere/issues/5173#issuecomment-615034193
 
 
   > Ok, let's close this issue.
   
   ### Supplementary information
   
   **after my test,use mybatis-plus to generate codes,if the id generate by 
snowflake,  Should  use** 
   
   ```
    /**
        * 主键
        */
       @TableId(value = "id", type = IdType.NONE)
       private Long id;
   ```
   
   or 
   
   ```
     /**
        * 主键
        */
       @TableId(value = "id", type = IdType.ID_WORKER)
       private Long id;
   ```
   
   **if the id generate by UUID , Should  use** 
   
   ```
   @TableId(value = "code", type = IdType.UUID)
       private String code;
   ```
   
   ```
    @TableId(value = "code", type = IdType.AUTO)
       private String code;
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to