Set comparator on Persistent SortedSet and SortedMap collection instances
This commit is contained in:
parent
4292d118ad
commit
71f633a8f7
|
@ -49,7 +49,9 @@ public class StandardSortedMapSemantics<K,V> extends AbstractMapSemantics<Sorted
|
|||
Object key,
|
||||
CollectionPersister collectionDescriptor,
|
||||
SharedSessionContractImplementor session) {
|
||||
return new PersistentSortedMap<>( session );
|
||||
final PersistentSortedMap<K,V> result = new PersistentSortedMap<>( session );
|
||||
result.setComparator( (Comparator<K>) collectionDescriptor.getSortingComparator() );
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -50,7 +50,9 @@ public class StandardSortedSetSemantics<E> extends AbstractSetSemantics<SortedSe
|
|||
Object key,
|
||||
CollectionPersister collectionDescriptor,
|
||||
SharedSessionContractImplementor session) {
|
||||
return new PersistentSortedSet<>( session );
|
||||
final PersistentSortedSet<E> result = new PersistentSortedSet<>( session );
|
||||
result.setComparator( (Comparator<E>) collectionDescriptor.getSortingComparator() );
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue