@@ -66,6 +66,8 @@ public class AnonymousTupleTableGroupProducer implements TableGroupProducer, Map
6666 private final JavaType <?> javaTypeDescriptor ;
6767 private final Map <String , ModelPart > modelParts ;
6868 private final Set <String > compatibleTableExpressions ;
69+ private final SqlTypedMapping [] sqlTypedMappings ;
70+ private final int jdbcTypeCount ;
6971
7072 public AnonymousTupleTableGroupProducer (
7173 AnonymousTupleType <?> tupleType ,
@@ -75,6 +77,7 @@ public AnonymousTupleTableGroupProducer(
7577 this .aliasStem = aliasStem ;
7678 this .javaTypeDescriptor = tupleType .getExpressibleJavaType ();
7779 final Set <String > compatibleTableExpressions = new HashSet <>();
80+ this .sqlTypedMappings = sqlTypedMappings ;
7881 // The empty table expression is the default for derived model parts
7982 compatibleTableExpressions .add ( "" );
8083
@@ -127,6 +130,7 @@ else if ( sqlTypedMappings[selectionIndex] instanceof SelectableMapping selectab
127130 }
128131 this .modelParts = modelParts ;
129132 this .compatibleTableExpressions = compatibleTableExpressions ;
133+ jdbcTypeCount = selectionIndex ;
130134 }
131135
132136 private ModelPart getModelPart (TableGroup tableGroup ) {
@@ -401,11 +405,16 @@ public <X, Y> int forEachDisassembledJdbcValue(
401405
402406 @ Override
403407 public JdbcMapping getJdbcMapping (int index ) {
404- throw new UnsupportedOperationException ( "Not yet implemented" );
408+ return sqlTypedMappings [ index ]. getJdbcMapping ( );
405409 }
406410
407411 @ Override
408412 public int forEachJdbcType (int offset , IndexedConsumer <JdbcMapping > action ) {
409413 throw new UnsupportedOperationException ( "Not yet implemented" );
410414 }
415+
416+ @ Override
417+ public int getJdbcTypeCount () {
418+ return jdbcTypeCount ;
419+ }
411420}
0 commit comments