Class SubselectPreparedStatementProxyHandler

java.lang.Object
com.blazebit.persistence.integration.hibernate.base.SubselectPreparedStatementProxyHandler
All Implemented Interfaces:
InvocationHandler

public class SubselectPreparedStatementProxyHandler
extends Object
implements InvocationHandler
Hibernate always binds positioned parameters before named parameters, which is problematic for any CTE prepended to the query, for which its parameters will be bound out of order. This InvocationHandler ensures that the indexes used for parameter bindings are adjusted accordingly, effectively swapping the positional query parameters with the named query parameters in the CTE query segment.
Since:
1.2.1
Author:
Jan-Willem Gmelig Meyling