collectionIntersects

fun <T : Any, E> KProperty1<T, Collection<E>>.collectionIntersects(subCollection: Collection<E>): Specification<T>(source)

Creates a Specification that tests whether a native collection column shares at least one element with the given sub-collection. Use this for properties mapped with @JdbcTypeCode(SqlTypes.ARRAY) and typed as Collection.

Return

A Specification that tests whether the native collection column intersects with the given sub-collection.

Parameters

subCollection

the sub-collection to check for overlap.

Type Parameters

T

the type of the entity.

E

the type of the element in the collection.


fun <ROOT : Any, E, PROP : Collection<E>> NestedProperty<ROOT, PROP>.collectionIntersects(subCollection: Collection<E>): Specification<ROOT>(source)

Creates a Specification that tests whether a nested native collection column shares at least one element with the given sub-collection. Use this for properties mapped with @JdbcTypeCode(SqlTypes.ARRAY) and typed as Collection.

Return

A Specification that tests whether the nested native collection column intersects with the given sub-collection.

Parameters

subCollection

the sub-collection to check for overlap.

Type Parameters

ROOT

the root entity type.

E

the type of the element in the collection.

PROP

the type of the Collection property.