HHH-3383 - QueryKey is storing references to entities instead of identifiers
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16660 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
baa2efd863
commit
77b959f5cc
|
@ -91,19 +91,25 @@ public class QueryKey implements Serializable {
|
|||
}
|
||||
|
||||
// disassemble named parameters
|
||||
Map namedParameters = CollectionHelper.mapOfSize( queryParameters.getNamedParameters().size() );
|
||||
Iterator itr = queryParameters.getNamedParameters().entrySet().iterator();
|
||||
while ( itr.hasNext() ) {
|
||||
final Map.Entry namedParameterEntry = ( Map.Entry ) itr.next();
|
||||
final TypedValue original = ( TypedValue ) namedParameterEntry.getValue();
|
||||
namedParameters.put(
|
||||
namedParameterEntry.getKey(),
|
||||
new TypedValue(
|
||||
original.getType(),
|
||||
original.getType().disassemble( original.getValue(), session, null ),
|
||||
session.getEntityMode()
|
||||
)
|
||||
);
|
||||
final Map namedParameters;
|
||||
if ( queryParameters.getNamedParameters() == null ) {
|
||||
namedParameters = null;
|
||||
}
|
||||
else {
|
||||
namedParameters = CollectionHelper.mapOfSize( queryParameters.getNamedParameters().size() );
|
||||
Iterator itr = queryParameters.getNamedParameters().entrySet().iterator();
|
||||
while ( itr.hasNext() ) {
|
||||
final Map.Entry namedParameterEntry = ( Map.Entry ) itr.next();
|
||||
final TypedValue original = ( TypedValue ) namedParameterEntry.getValue();
|
||||
namedParameters.put(
|
||||
namedParameterEntry.getKey(),
|
||||
new TypedValue(
|
||||
original.getType(),
|
||||
original.getType().disassemble( original.getValue(), session, null ),
|
||||
session.getEntityMode()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// decode row selection...
|
||||
|
|
Loading…
Reference in New Issue