HHH-18488 Remove table-information-group attribute group in hbm mapping

- just use a list of attributes instead of the group.
This commit is contained in:
marko-bekhta 2024-08-11 20:45:32 +02:00 committed by Steve Ebersole
parent cf6d9619b0
commit 7c594d1412
4 changed files with 33 additions and 30 deletions

View File

@ -20,5 +20,4 @@ public interface TableInformationContainer {
String getSubselect();
String getSubselectAttribute();
}

View File

@ -185,8 +185,7 @@ public class Helper {
String rowId,
String comment,
String checkConstraint) {
if ( StringHelper.isEmpty( tableInformationContainer.getSubselectAttribute() )
&& StringHelper.isEmpty( tableInformationContainer.getSubselect() ) ) {
if ( StringHelper.isEmpty( tableInformationContainer.getSubselect() ) ) {
return new TableSourceImpl(
mappingDocument,
tableInformationContainer.getSchema(),
@ -202,9 +201,7 @@ public class Helper {
mappingDocument,
tableInformationContainer.getSchema(),
tableInformationContainer.getCatalog(),
tableInformationContainer.getSubselectAttribute() != null
? tableInformationContainer.getSubselectAttribute()
: tableInformationContainer.getSubselect(),
tableInformationContainer.getSubselect(),
tableInformationContainer.getTable() == null
? inLineViewNameInferrer.inferInLineViewName()
: tableInformationContainer.getTable(),

View File

@ -493,7 +493,9 @@
<xs:group ref="NamedQueryGroup"/>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attribute name="check" type="xs:string"/>
<xs:attribute name="discriminator-value" type="xs:string" />
</xs:extension>
@ -542,7 +544,9 @@
<xs:group ref="NamedQueryGroup"/>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attribute name="check" type="xs:string"/>
</xs:extension>
</xs:complexContent>
@ -746,7 +750,9 @@
<xs:group ref="CustomSqlDmlCollectionGroup"/>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded" type="filter-type"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attributeGroup ref="plural-basic-attribute-group"/>
<xs:attribute name="embed-xml" type="xs:boolean"/>
<xs:attribute name="fetch" type="FetchStyleWithSubselectEnum"/>
@ -792,7 +798,9 @@
<xs:group ref="CustomSqlDmlCollectionGroup"/>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded" type="filter-type"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attribute name="access" type="xs:string"/>
<xs:attribute name="batch-size" default="-1" type="xs:int"/>
<xs:attribute name="cascade" type="xs:string"/>
@ -832,7 +840,9 @@
<xs:group ref="CustomSqlDmlCollectionGroup"/>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded" type="filter-type"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attributeGroup ref="plural-basic-attribute-group"/>
<xs:attribute name="embed-xml" type="xs:boolean"/>
<xs:attribute name="fetch" type="FetchStyleWithSubselectEnum"/>
@ -864,7 +874,9 @@
<xs:group ref="CustomSqlDmlCollectionGroup"/>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded" type="filter-type"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attributeGroup ref="plural-basic-attribute-group"/>
<xs:attribute name="embed-xml" type="xs:boolean"/>
<xs:attribute name="fetch" type="FetchStyleWithSubselectEnum"/>
@ -899,7 +911,9 @@
<xs:group ref="CustomSqlDmlCollectionGroup"/>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded" type="filter-type"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attributeGroup ref="plural-basic-attribute-group"/>
<xs:attribute name="embed-xml" type="xs:boolean"/>
<xs:attribute name="fetch" type="FetchStyleWithSubselectEnum"/>
@ -929,7 +943,9 @@
<xs:group ref="CustomSqlDmlCollectionGroup"/>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded" type="filter-type"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attributeGroup ref="plural-basic-attribute-group"/>
<xs:attribute name="embed-xml" type="xs:boolean"/>
<xs:attribute name="fetch" type="FetchStyleWithSubselectEnum"/>
@ -1386,7 +1402,9 @@
</xs:choice>
<xs:group ref="CustomSqlDmlGroup"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attribute name="fetch" default="join" type="FetchStyleEnum"/>
<xs:attribute name="inverse" default="false" type="xs:boolean"/>
<xs:attribute name="optional" default="false" type="xs:boolean"/>
@ -1634,7 +1652,9 @@
<xs:element name="loader" minOccurs="0" type="loader-type"/>
<xs:group ref="CustomSqlDmlCollectionGroup"/>
</xs:sequence>
<xs:attributeGroup ref="table-information-group"/>
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<xs:attribute name="access" type="xs:string"/>
<xs:attribute name="batch-size" default="-1" type="xs:int"/>
<xs:attribute name="check" type="xs:string"/>
@ -1853,15 +1873,6 @@
<xs:attribute name="collection-type" type="xs:string"/>
<xs:attribute name="persister" type="ClassNameType"/>
</xs:attributeGroup>
<xs:attributeGroup name="table-information-group">
<xs:attribute name="schema" type="xs:string"/>
<xs:attribute name="catalog" type="xs:string"/>
<xs:attribute name="table" type="xs:string"/>
<!-- default: unqualified class name -->
<xs:attribute name="subselect" type="xs:string"/>
</xs:attributeGroup>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Enums -->

View File

@ -375,10 +375,6 @@
<jaxb:property name="columnAttribute"/>
</jaxb:bindings>
<jaxb:bindings node="//xsd:attributeGroup[@name='table-information-group']//xsd:attribute[@name='subselect']">
<jaxb:property name="subselectAttribute"/>
</jaxb:bindings>
<jaxb:bindings node="//xsd:complexType[@name='multi-tenancy-type']//xsd:attribute[@name='column']">
<jaxb:property name="columnAttribute"/>
</jaxb:bindings>
@ -395,4 +391,4 @@
<jaxb:serializable />
</jaxb:globalBindings>
</jaxb:bindings>
</jaxb:bindings>