6 - SQM based on JPA type system

This commit is contained in:
Andrea Boriero 2019-07-11 11:40:12 +01:00
parent f48f486ec6
commit c0cabdbfe8
3 changed files with 8 additions and 5 deletions

View File

@ -937,7 +937,7 @@ public class StatefulPersistenceContext implements PersistenceContext {
}
@Override
public CollectionEntry addInitializedCollection(CollectionPersister persister, PersistentCollection collection, Object id)
public CollectionEntry addInitializedCollection(CollectionPersister persister, PersistentCollection collection, Serializable id)
throws HibernateException {
final CollectionEntry ce = new CollectionEntry( collection, persister, id, flushing );
ce.postInitialize( collection );

View File

@ -409,7 +409,7 @@ public interface PersistenceContext {
CollectionEntry addInitializedCollection(
CollectionPersister persister,
PersistentCollection collection,
Object id);
Serializable id);
/**
* Get the collection instance associated with the <tt>CollectionKey</tt>

View File

@ -6,6 +6,8 @@
*/
package org.hibernate.sql.results.spi;
import java.io.Serializable;
import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.engine.spi.CollectionEntry;
import org.hibernate.engine.spi.PersistenceContext;
@ -21,13 +23,14 @@ import org.hibernate.sql.exec.spi.ExecutionContext;
public class LoadingCollectionEntry {
private final CollectionPersister collectionDescriptor;
private final CollectionInitializer initializer;
private final Object key;
// todo (6.0) : change from Serializable to Object
private final Serializable key;
private final PersistentCollection collectionInstance;
public LoadingCollectionEntry(
CollectionPersister collectionDescriptor,
CollectionInitializer initializer,
Object key,
Serializable key,
PersistentCollection collectionInstance) {
this.collectionDescriptor = collectionDescriptor;
this.initializer = initializer;
@ -49,7 +52,7 @@ public class LoadingCollectionEntry {
return initializer;
}
public Object getKey() {
public Serializable getKey() {
return key;
}