add missing jdoc for hibernate.discriminator.force_in_select setting

This commit is contained in:
Gavin King 2024-12-12 18:34:40 +01:00
parent 301c38bf7d
commit 8782cb689e
3 changed files with 12 additions and 2 deletions

View File

@ -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.

View File

@ -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}
*/

View File

@ -251,7 +251,7 @@ public abstract class PersistentClass implements IdentifiableTypeClass, Attribut
*/
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();