mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-07 19:58:16 +00:00
Fix SmqBagJoin, SqmSetJoin and SqmListJoin throwing NotYetImplementedFor6Exception
This commit is contained in:
parent
cbeedd1c32
commit
629b318731
@ -11,6 +11,7 @@
|
||||
import org.hibernate.metamodel.internal.MetadataContext;
|
||||
import org.hibernate.metamodel.model.domain.SetPersistentAttribute;
|
||||
import org.hibernate.query.hql.spi.SqmCreationState;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.tree.SqmJoinType;
|
||||
import org.hibernate.query.sqm.tree.domain.SqmSetJoin;
|
||||
import org.hibernate.query.sqm.tree.from.SqmAttributeJoin;
|
||||
|
@ -8,20 +8,16 @@
|
||||
|
||||
import java.util.Collection;
|
||||
import javax.persistence.criteria.Expression;
|
||||
import javax.persistence.criteria.JoinType;
|
||||
import javax.persistence.criteria.Predicate;
|
||||
import javax.persistence.metamodel.PluralAttribute;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.metamodel.model.domain.BagPersistentAttribute;
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
import org.hibernate.query.PathException;
|
||||
import org.hibernate.query.criteria.JpaCollectionJoin;
|
||||
import org.hibernate.query.criteria.JpaExpression;
|
||||
import org.hibernate.query.criteria.JpaPredicate;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.hql.spi.SqmCreationProcessingState;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.tree.SqmJoinType;
|
||||
import org.hibernate.query.sqm.tree.from.SqmAttributeJoin;
|
||||
import org.hibernate.query.sqm.tree.from.SqmFrom;
|
||||
@ -43,8 +39,7 @@ public SqmBagJoin(
|
||||
|
||||
@Override
|
||||
public BagPersistentAttribute<O,E> getReferencedPathSource() {
|
||||
//noinspection unchecked
|
||||
return (BagPersistentAttribute) super.getReferencedPathSource();
|
||||
return (BagPersistentAttribute<O,E>) super.getReferencedPathSource();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -85,36 +80,6 @@ public SqmBagJoin<O, E> on(Predicate... restrictions) {
|
||||
|
||||
// todo (6.0) : need to resolve these fetches against the element/index descriptors
|
||||
|
||||
@Override
|
||||
public <A> SqmSingularJoin<E, A> fetch(SingularAttribute<? super E, A> attribute) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <A> SqmSingularJoin<E,A> fetch(SingularAttribute<? super E, A> attribute, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <F> SqmAttributeJoin<E,F> fetch(PluralAttribute<? super E, ?, F> attribute) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <F> SqmAttributeJoin<E,F> fetch(PluralAttribute<? super E, ?, F> attribute, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <X,Y> SqmAttributeJoin<X,Y> fetch(String attributeName) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <X,Y> SqmAttributeJoin<X,Y> fetch(String attributeName, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqmCorrelatedBagJoin<O, E> createCorrelation() {
|
||||
return new SqmCorrelatedBagJoin<>( this );
|
||||
|
@ -8,12 +8,8 @@
|
||||
|
||||
import java.util.List;
|
||||
import javax.persistence.criteria.Expression;
|
||||
import javax.persistence.criteria.JoinType;
|
||||
import javax.persistence.criteria.Predicate;
|
||||
import javax.persistence.metamodel.PluralAttribute;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
import org.hibernate.metamodel.model.domain.ListPersistentAttribute;
|
||||
import org.hibernate.query.NavigablePath;
|
||||
@ -21,8 +17,8 @@
|
||||
import org.hibernate.query.criteria.JpaExpression;
|
||||
import org.hibernate.query.criteria.JpaListJoin;
|
||||
import org.hibernate.query.criteria.JpaPredicate;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.hql.spi.SqmCreationProcessingState;
|
||||
import org.hibernate.query.sqm.NodeBuilder;
|
||||
import org.hibernate.query.sqm.tree.SqmJoinType;
|
||||
import org.hibernate.query.sqm.tree.from.SqmAttributeJoin;
|
||||
import org.hibernate.query.sqm.tree.from.SqmFrom;
|
||||
@ -116,36 +112,6 @@ public <S extends E> SqmTreatedListJoin<O,E,S> treatAs(EntityDomainType<S> treat
|
||||
return new SqmTreatedListJoin( this, treatTarget, null );
|
||||
}
|
||||
|
||||
@Override
|
||||
public <A> SqmSingularJoin<E, A> fetch(SingularAttribute<? super E, A> attribute) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <A> SqmSingularJoin<E,A> fetch(SingularAttribute<? super E, A> attribute, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <F> SqmAttributeJoin<E,F> fetch(PluralAttribute<? super E, ?, F> attribute) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <F> SqmAttributeJoin<E,F> fetch(PluralAttribute<? super E, ?, F> attribute, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <X,Y> SqmAttributeJoin<X,Y> fetch(String attributeName) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <X,Y> SqmAttributeJoin<X,Y> fetch(String attributeName, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqmAttributeJoin makeCopy(SqmCreationProcessingState creationProcessingState) {
|
||||
//noinspection unchecked
|
||||
|
@ -10,10 +10,7 @@
|
||||
import javax.persistence.criteria.Expression;
|
||||
import javax.persistence.criteria.JoinType;
|
||||
import javax.persistence.criteria.Predicate;
|
||||
import javax.persistence.metamodel.PluralAttribute;
|
||||
import javax.persistence.metamodel.SingularAttribute;
|
||||
|
||||
import org.hibernate.NotYetImplementedFor6Exception;
|
||||
import org.hibernate.metamodel.model.domain.EntityDomainType;
|
||||
import org.hibernate.metamodel.model.domain.SetPersistentAttribute;
|
||||
import org.hibernate.query.PathException;
|
||||
@ -99,36 +96,9 @@ public <S extends E> SqmTreatedSetJoin<O,E,S> treatAs(EntityDomainType<S> treatT
|
||||
return new SqmTreatedSetJoin<>( this, treatTarget, null );
|
||||
}
|
||||
|
||||
// todo (6.0) : need to resolve these fetches against the element/index descriptors
|
||||
|
||||
@Override
|
||||
public <A> SqmSingularJoin<E, A> fetch(SingularAttribute<? super E, A> attribute) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <A> SqmSingularJoin<E, A> fetch(SingularAttribute<? super E, A> attribute, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <F> SqmAttributeJoin<E, F> fetch(PluralAttribute<? super E, ?, F> attribute) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <F> SqmAttributeJoin<E, F> fetch(PluralAttribute<? super E, ?, F> attribute, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <X, Y> SqmAttributeJoin<X, Y> fetch(String attributeName) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <X, Y> SqmAttributeJoin<X, Y> fetch(String attributeName, JoinType jt) {
|
||||
throw new NotYetImplementedFor6Exception();
|
||||
return fetch( attributeName, JoinType.INNER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user