Hi Mat Johnson, I tried your test with SQL Server and it looks fine, the log is select TOP this_.id1 as id1_1_0_, this_.id3 as id2_1_0_, this_.id4 as id3_1_0_, this_.city as city4_1_0_, this_.street as street5_1_0_, this_.age as age6_1_0_, this_.name as name7_1_0_, this_.organisationUnit_id as organis10_1_0_, this_.STATUS as STATUS8_1_0_, this_.theId as theId9_1_0_ from STUDENT this_ where this_.STATUS = ? and ( this_.organisationUnit_id IN ( ?, ? ) OR this_.organisationUnit_id IS NULL ) and this_.theId in ( select distinct s_.theId as y0_ from STUDENT s_ where s_.STATUS = ? and ( s_.organisationUnit_id IN ( ?, ? ) OR s_.organisationUnit_id IS NULL ) ) 22:16:24,326 TRACE BasicBinder:65 - binding parameter [2] as [VARCHAR] - [active] 22:16:24,327 TRACE BasicBinder:65 - binding parameter [3] as [INTEGER] - [1] 22:16:24,327 TRACE BasicBinder:65 - binding parameter [4] as [INTEGER] - [2] 22:16:24,327 TRACE BasicBinder:65 - binding parameter [5] as [VARCHAR] - [active] 22:16:24,328 TRACE BasicBinder:65 - binding parameter [6] as [INTEGER] - [1] 22:16:24,328 TRACE BasicBinder:65 - binding parameter [7] as [INTEGER] - [2] and as you can see the first binding parameter has index 2, the binding of the TOP is done by SQLServer2005LimitHandler#bindLimitParametersAtStartOfQuery() and simply is not logged. |