You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/discriminator/JoinedInheritanceDiscriminatorSelectionTest.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -141,28 +141,28 @@ public void testSelectInstance(SessionFactoryScope scope) {
141
141
inspector.clear();
142
142
143
143
scope.inTransaction( session -> {
144
-
// With type filters we still join all subclasses when selecting the entity instance
144
+
// With type filters we still join all subclasses that have properties when selecting the entity instance
145
145
// because we are not aware of the type restriction when processing the selection
146
146
147
147
assertThat( session.createQuery(
148
148
"from ParentEntity p where type(p) = ParentEntity",
149
149
ParentEntity.class
150
150
).getResultList() ).hasSize( 1 );
151
-
inspector.assertNumberOfJoins( 0, 3 );
151
+
inspector.assertNumberOfJoins( 0, 2 );
152
152
inspector.clear();
153
153
154
154
assertThat( session.createQuery(
155
155
"from ParentEntity p where type(p) = ChildA",
156
156
ParentEntity.class
157
157
).getResultList() ).hasSize( 1 );
158
-
inspector.assertNumberOfJoins( 0, 3 );
158
+
inspector.assertNumberOfJoins( 0, 2 );
159
159
inspector.clear();
160
160
161
161
assertThat( session.createQuery(
162
162
"from ParentEntity p where type(p) = SubChildA",
163
163
ParentEntity.class
164
164
).getResultList() ).hasSize( 1 );
165
-
inspector.assertNumberOfJoins( 0, 3 );
165
+
inspector.assertNumberOfJoins( 0, 2 );
166
166
inspector.clear();
167
167
168
168
// With treat() we only join the needed subclasses
0 commit comments