HHH-11375 - SINGLE_TABLE associated entity query missing restriction of DiscriminatorColumn

This commit is contained in:
Andrea Boriero 2017-01-18 11:35:23 +00:00
parent 4d5c66c80b
commit 34d92507c9
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ public class SingleTableEntityPersister extends AbstractEntityPersister {
}
public String oneToManyFilterFragment(String alias) throws MappingException {
return forceDiscriminator
return needsDiscriminator()
? discriminatorFilterFragment( alias, null )
: "";
}