HHH-12440 - Fix audited associations that use mapped-by references to embeddable attributes.
This commit is contained in:
parent
09cd41e382
commit
101038fe48
|
@ -877,7 +877,7 @@ public final class CollectionMetadataGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getMappedBy(Table collectionTable, PersistentClass referencedClass) {
|
private String getMappedBy(Table collectionTable, PersistentClass referencedClass) {
|
||||||
return getMappedBy( referencedClass, new ValueHolder( collectionTable, propertyValue.getMappedByProperty() ) );
|
return getMappedBy( referencedClass, new ValueHolder( collectionTable ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getMappedBy(PersistentClass referencedClass, ValueHolder valueHolder) {
|
private String getMappedBy(PersistentClass referencedClass, ValueHolder valueHolder) {
|
||||||
|
@ -993,13 +993,6 @@ public final class CollectionMetadataGenerator {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getMappedByPropertyValue(ValueHolder valueHolder) {
|
|
||||||
if ( valueHolder.getMappedByProperty() != null ) {
|
|
||||||
return valueHolder.getMappedByProperty();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private PersistentClass getReferenceCollectionClass(Collection collectionValue) {
|
private PersistentClass getReferenceCollectionClass(Collection collectionValue) {
|
||||||
PersistentClass referencedClass = null;
|
PersistentClass referencedClass = null;
|
||||||
if ( collectionValue.getElement() instanceof OneToMany ) {
|
if ( collectionValue.getElement() instanceof OneToMany ) {
|
||||||
|
@ -1024,7 +1017,6 @@ public final class CollectionMetadataGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ValueHolder {
|
private class ValueHolder {
|
||||||
private String mappedByProperty;
|
|
||||||
private Collection collection;
|
private Collection collection;
|
||||||
private Table table;
|
private Table table;
|
||||||
|
|
||||||
|
@ -1032,9 +1024,8 @@ public final class CollectionMetadataGenerator {
|
||||||
this.collection = collection;
|
this.collection = collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ValueHolder(Table table, String mappedByProperty) {
|
public ValueHolder(Table table) {
|
||||||
this.table = table;
|
this.table = table;
|
||||||
this.mappedByProperty = mappedByProperty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection getCollection() {
|
public Collection getCollection() {
|
||||||
|
@ -1044,10 +1035,6 @@ public final class CollectionMetadataGenerator {
|
||||||
public Table getTable() {
|
public Table getTable() {
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMappedByProperty() {
|
|
||||||
return mappedByProperty;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue