Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public BulkOperationCleanupAction(SharedSessionContractImplementor session, Enti
);
}

final MappingMetamodelImplementor mappingMetamodel = session.getFactory().getRuntimeMetamodels().getMappingMetamodel();
final MappingMetamodelImplementor mappingMetamodel = session.getFactory().getMappingMetamodel();
final Set<String> roles = mappingMetamodel.getCollectionRolesByEntityParticipant( persister.getEntityName() );
if ( roles != null ) {
for ( String role : roles ) {
Expand Down Expand Up @@ -149,9 +149,9 @@ public static void schedule(SharedSessionContractImplementor session, SqmDmlStat
}
for ( SqmCteStatement<?> cteStatement : statement.getCteStatements() ) {
final SqmQuery<?> cteDefinition = cteStatement.getCteDefinition();
if ( cteDefinition instanceof SqmDmlStatement<?> ) {
if ( cteDefinition instanceof SqmDmlStatement<?> dmlStatement ) {
entityPersisters.add(
metamodel.getEntityDescriptor( ( (SqmDmlStatement<?>) cteDefinition ).getTarget().getEntityName() )
metamodel.getEntityDescriptor( dmlStatement.getTarget().getEntityName() )
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public interface MetadataBuilder {

/**
* For entities which do not explicitly say, should we force discriminators into
* SQL selects? The (historical) default is {@code false}
* SQL selects? The (historical) default is {@code false}.
* <p>
* Its default is defined by the {@value org.hibernate.cfg.AvailableSettings#FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT}
* setting if using property-based configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,17 @@ public interface MappingSettings {
String TRANSFORM_HBM_XML_FEATURE_HANDLING = "hibernate.transform_hbm_xml.unsupported_feature_handling";

/**
* Specifies that Hibernate should always restrict by discriminator values in
* SQL {@code select} statements, even when querying the root entity of an
* entity inheritance hierarchy.
* <p>
* By default, Hibernate only restricts by discriminator values when querying
* a subtype, or when the root entity is explicitly annotated
* {@link org.hibernate.annotations.DiscriminatorOptions#force
* DiscriminatorOptions(force=true)}.
*
* @see org.hibernate.boot.MetadataBuilder#enableImplicitForcingOfDiscriminatorsInSelect
* @see org.hibernate.annotations.DiscriminatorOptions#force
*
* @settingDefault {@code false}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public int getSubclassSpan() {
*/
public List<Subclass> getSubclasses() {
@SuppressWarnings("unchecked")
List<Subclass>[] subclassLists = new List[subclasses.size() + 1];
final List<Subclass>[] subclassLists = new List[subclasses.size() + 1];
int j;
for (j = 0; j < subclasses.size(); j++) {
subclassLists[j] = subclasses.get(j).getSubclasses();
Expand Down
Loading