ppj19891020 commented on issue #1798: spring JPA simple sql update error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/1798#issuecomment-456371538
 
 
   Reason analyze:
   debug info:
   class:Loader.java
   method:processResultSet
   **this rs.next() call two times,  result list size is two,finally jpa throw 
error;**
   rs:ShardingResultSet   call    IteratorStreamMergedResult
   
   jpa code:
   ```
   for ( count = 0; count < maxRows && rs.next(); count++ ) {
                        if ( DEBUG_ENABLED ) {
                                LOG.debugf( "Result set row: %s", count );
                        }
                        Object result = getRowFromResultSet(
                                        rs,
                                        session,
                                        queryParameters,
                                        lockModesArray,
                                        optionalObjectKey,
                                        hydratedObjects,
                                        keys,
                                        returnProxies,
                                        forcedResultTransformer
                        );
                        results.add( result );
                        if ( createSubselects ) {
                                subselectResultKeys.add( keys );
                                keys = new EntityKey[entitySpan]; //can't reuse 
in this case
                        }
                }
   ```
   
   

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


With regards,
Apache Git Services

Reply via email to