xinghh100-githhub commented on issue #2285: Whether to support the use of 
select last_insert_id () to return the self-growth primary key?
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2285#issuecomment-487348999
 
 
   Some business scenarios need to return to the auto-increment primary key 
after the insert operation, rather than before the insert, for example:
   <insert id="insertSelective" parameterType="xxx" >
        <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
          Select LAST_INSERT_ID()
        </selectKey>
        Insert into ...
   </insert>
   The current version is not compatible with this mode, and can only be used 
in the mode of first obtaining the distributed primary key and then inserting 
it. (MyCat supports the above modes)

----------------------------------------------------------------
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