mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1665 - Incorrect query execution metrics for ORM query converted to DTO query via asDto()
This commit is contained in:
@@ -144,15 +144,13 @@ public abstract class AbstractSqlQueryRequest {
|
||||
* Prepare and execute the SQL using the Binder.
|
||||
*/
|
||||
public void executeSql(Binder binder, SpiQuery.Type type) throws SQLException {
|
||||
startNano = System.nanoTime();
|
||||
executeAsSql(binder);
|
||||
}
|
||||
|
||||
protected void executeAsSql(Binder binder) throws SQLException {
|
||||
|
||||
startNano = System.nanoTime();
|
||||
|
||||
prepareSql();
|
||||
|
||||
Connection conn = trans.getInternalConnection();
|
||||
|
||||
pstmt = conn.prepareStatement(sql);
|
||||
|
||||
@@ -44,6 +44,7 @@ public final class DtoQueryRequest<T> extends AbstractSqlQueryRequest {
|
||||
*/
|
||||
@Override
|
||||
public void executeSql(Binder binder, SpiQuery.Type type) throws SQLException {
|
||||
startNano = System.nanoTime();
|
||||
SpiQuery<?> ormQuery = query.getOrmQuery();
|
||||
if (ormQuery != null) {
|
||||
ormQuery.setType(type);
|
||||
|
||||
Reference in New Issue
Block a user