Skip to content

Commit 8782cb6

Browse files
committed
add missing jdoc for hibernate.discriminator.force_in_select setting
1 parent 301c38b commit 8782cb6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

hibernate-core/src/main/java/org/hibernate/boot/MetadataBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public interface MetadataBuilder {
245245

246246
/**
247247
* For entities which do not explicitly say, should we force discriminators into
248-
* SQL selects? The (historical) default is {@code false}
248+
* SQL selects? The (historical) default is {@code false}.
249249
* <p>
250250
* Its default is defined by the {@value org.hibernate.cfg.AvailableSettings#FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT}
251251
* setting if using property-based configuration.

hibernate-core/src/main/java/org/hibernate/cfg/MappingSettings.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,17 @@ public interface MappingSettings {
507507
String TRANSFORM_HBM_XML_FEATURE_HANDLING = "hibernate.transform_hbm_xml.unsupported_feature_handling";
508508

509509
/**
510+
* Specifies that Hibernate should always restrict by discriminator values in
511+
* SQL {@code select} statements, even when querying the root entity of an
512+
* entity inheritance hierarchy.
513+
* <p>
514+
* By default, Hibernate only restricts by discriminator values when querying
515+
* a subtype, or when the root entity is explicitly annotated
516+
* {@link org.hibernate.annotations.DiscriminatorOptions#force
517+
* DiscriminatorOptions(force=true)}.
518+
*
510519
* @see org.hibernate.boot.MetadataBuilder#enableImplicitForcingOfDiscriminatorsInSelect
520+
* @see org.hibernate.annotations.DiscriminatorOptions#force
511521
*
512522
* @settingDefault {@code false}
513523
*/

hibernate-core/src/main/java/org/hibernate/mapping/PersistentClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public int getSubclassSpan() {
251251
*/
252252
public List<Subclass> getSubclasses() {
253253
@SuppressWarnings("unchecked")
254-
List<Subclass>[] subclassLists = new List[subclasses.size() + 1];
254+
final List<Subclass>[] subclassLists = new List[subclasses.size() + 1];
255255
int j;
256256
for (j = 0; j < subclasses.size(); j++) {
257257
subclassLists[j] = subclasses.get(j).getSubclasses();

0 commit comments

Comments
 (0)