HHH-6113 re-fact and more tests
This commit is contained in:
parent
c62e5fccc8
commit
c1415b4b8f
|
@ -65,7 +65,7 @@ abstract class AnnotationMocker extends AbstractMocker {
|
|||
}
|
||||
|
||||
protected boolean isDefaultCascadePersist() {
|
||||
return defaults.isCascadePersist();
|
||||
return defaults.isCascadePersist()!=null && defaults.isCascadePersist();
|
||||
}
|
||||
|
||||
//@JoinTable
|
||||
|
|
|
@ -95,7 +95,7 @@ class DefaultConfigurationHelper {
|
|||
if ( hasSchemaOrCatalogDefined( defaults ) ) {
|
||||
applyDefaultSchemaAndCatalog( annotationsMap, defaults );
|
||||
}
|
||||
if ( defaults.isCascadePersist() ) {
|
||||
if ( defaults.isCascadePersist()!=null && defaults.isCascadePersist() ) {
|
||||
applyDefaultCascadePersist( annotationsMap );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,8 +165,8 @@ public class EntityMappingsMocker {
|
|||
private String packageName;
|
||||
private String schema;
|
||||
private String catalog;
|
||||
private boolean metadataComplete;
|
||||
private boolean cascadePersist;
|
||||
private Boolean metadataComplete;
|
||||
private Boolean cascadePersist;
|
||||
|
||||
public XMLAccessType getAccess() {
|
||||
return access;
|
||||
|
@ -200,19 +200,19 @@ public class EntityMappingsMocker {
|
|||
this.schema = schema;
|
||||
}
|
||||
|
||||
public boolean isMetadataComplete() {
|
||||
public Boolean isMetadataComplete() {
|
||||
return metadataComplete;
|
||||
}
|
||||
|
||||
void setMetadataComplete(boolean metadataComplete) {
|
||||
void setMetadataComplete(Boolean metadataComplete) {
|
||||
this.metadataComplete = metadataComplete;
|
||||
}
|
||||
|
||||
public boolean isCascadePersist() {
|
||||
public Boolean isCascadePersist() {
|
||||
return cascadePersist;
|
||||
}
|
||||
|
||||
void setCascadePersist(boolean cascadePersist) {
|
||||
void setCascadePersist(Boolean cascadePersist) {
|
||||
this.cascadePersist = cascadePersist;
|
||||
}
|
||||
|
||||
|
@ -230,9 +230,14 @@ public class EntityMappingsMocker {
|
|||
if ( globalDefault.getCatalog() != null ) {
|
||||
catalog = globalDefault.getCatalog();
|
||||
}
|
||||
metadataComplete = globalDefault.isMetadataComplete();
|
||||
if ( globalDefault.isCascadePersist() != null ) {
|
||||
cascadePersist = globalDefault.isCascadePersist();
|
||||
}
|
||||
if ( globalDefault.isMetadataComplete() != null ) {
|
||||
metadataComplete = globalDefault.isMetadataComplete();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,9 +184,9 @@ public class IndexBuilder {
|
|||
// annotations classes overrided by xml
|
||||
if ( indexedClassInfoAnnotationsMap.containsKey( name ) ) {
|
||||
Map<DotName, List<AnnotationInstance>> tmp = getIndexedAnnotations( name );
|
||||
DefaultConfigurationHelper.INSTANCE.applyDefaults( tmp, defaults );
|
||||
mergeAnnotationMap( tmp, map );
|
||||
}
|
||||
DefaultConfigurationHelper.INSTANCE.applyDefaults( map, defaults );
|
||||
|
||||
mergeAnnotationMap( map, annotations );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue