From 34d92507c99cede0682a60d3af947a0ee7809dd1 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Wed, 18 Jan 2017 11:35:23 +0000 Subject: [PATCH] HHH-11375 - SINGLE_TABLE associated entity query missing restriction of DiscriminatorColumn --- .../hibernate/persister/entity/SingleTableEntityPersister.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java index a9fdbdcfe8..ea079ed354 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java @@ -563,7 +563,7 @@ public class SingleTableEntityPersister extends AbstractEntityPersister { } public String oneToManyFilterFragment(String alias) throws MappingException { - return forceDiscriminator + return needsDiscriminator() ? discriminatorFilterFragment( alias, null ) : ""; }