Example usage for org.hibernate.boot.model.naming ImplicitJoinTableNameSource getAssociationOwningAttributePath

List of usage examples for org.hibernate.boot.model.naming ImplicitJoinTableNameSource getAssociationOwningAttributePath

Introduction

In this page you can find the example usage for org.hibernate.boot.model.naming ImplicitJoinTableNameSource getAssociationOwningAttributePath.

Prototype

public AttributePath getAssociationOwningAttributePath();

Source Link

Document

Access to the name of the attribute, from the owning side, that defines the association.

Usage

From source file:com.devnexus.ting.core.hibernate.DevNexusSpringImplicitNamingStrategy.java

License:Apache License

@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    String name = source.getOwningPhysicalTableName() + "_"
            + source.getAssociationOwningAttributePath().getProperty();
    return toIdentifier(name, source.getBuildingContext());
}

From source file:com.evolveum.midpoint.repo.sql.util.MidPointImplicitNamingStrategy.java

License:Apache License

@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    Identifier i = super.determineJoinTableName(source);

    LOGGER.trace("determineJoinTableName {} {} {} {} {} -> {}", source.getOwningEntityNaming(),
            source.getOwningPhysicalTableName(), source.getNonOwningEntityNaming(),
            source.getNonOwningPhysicalTableName(), source.getAssociationOwningAttributePath(), i);

    return i;/*from  www  . j ava2 s.  co  m*/
}

From source file:com.example.ejb3.auction.NamingStrategy.java

License:Apache License

@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    if (source.getAssociationOwningAttributePath() != null) {
        final String name = source.getOwningPhysicalTableName() + '_'
                + transformAttributePath(source.getAssociationOwningAttributePath());

        return toIdentifier(name, source.getBuildingContext());
    }//from  w ww  . j  av  a  2 s  . c  o m

    return super.determineJoinTableName(source);
}

From source file:org.ligoj.bootstrap.core.dao.ImplicitNamingStrategyNiceJpaImpl.java

License:MIT License

@Override
public Identifier determineJoinTableName(final ImplicitJoinTableNameSource source) {
    final var name = source.getOwningPhysicalTableName() + '_'
            + transformAttributePath(source.getAssociationOwningAttributePath());
    return toIdentifier(name, source.getBuildingContext());
}