Example usage for org.hibernate.type CollectionType getForeignKeyDirection

List of usage examples for org.hibernate.type CollectionType getForeignKeyDirection

Introduction

In this page you can find the example usage for org.hibernate.type CollectionType getForeignKeyDirection.

Prototype

@Override
    public ForeignKeyDirection getForeignKeyDirection() 

Source Link

Usage

From source file:com.blazebit.persistence.integration.hibernate.base.HibernateJpaProvider.java

License:Apache License

protected boolean isForeignKeyDirectionToParent(CollectionType collectionType) {
    ForeignKeyDirection direction = collectionType.getForeignKeyDirection();
    // Types changed between 4 and 5 so we check it like this. Essentially we check if the TO_PARENT direction is used
    return direction.toString().regionMatches(true, 0, "to", 0, 2);
}