Skip to content

Commit f5c548b

Browse files
committed
Various code cleanup
1 parent b7fcdad commit f5c548b

File tree

1 file changed

+16
-38
lines changed

1 file changed

+16
-38
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/mapping/hhh14276/NestedIdClassDerivedIdentifiersTest.java

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,27 @@
44
*/
55
package org.hibernate.orm.test.mapping.hhh14276;
66

7-
import static org.hibernate.testing.transaction.TransactionUtil.doInJPA;
8-
9-
import java.util.Map;
10-
11-
import org.hibernate.cfg.AvailableSettings;
12-
import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase;
13-
import org.hibernate.query.sqm.mutation.internal.inline.InlineMutationStrategy;
14-
7+
import org.hibernate.SessionFactory;
8+
import org.hibernate.cfg.Configuration;
159
import org.hibernate.orm.test.mapping.hhh14276.entity.PlayerStat;
1610
import org.hibernate.orm.test.mapping.hhh14276.entity.Score;
1711
import org.hibernate.testing.orm.junit.JiraKey;
18-
import org.junit.Before;
19-
import org.junit.Test;
20-
21-
@JiraKey(value = "HHH-14276")
22-
public class NestedIdClassDerivedIdentifiersTest extends BaseEntityManagerFunctionalTestCase {
23-
@Override
24-
protected Class<?>[] getAnnotatedClasses() {
25-
return new Class<?>[] {
26-
PlayerStat.class,
27-
Score.class
28-
};
29-
}
30-
31-
@Override
32-
protected void addConfigOptions(Map options) {
33-
options.put( AvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS, Boolean.TRUE );
34-
options.put( AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY, InlineMutationStrategy.class.getName() );
35-
}
12+
import org.junit.jupiter.api.Test;
3613

37-
@Before
38-
public void setUp() {
39-
doInJPA( this::entityManagerFactory, em ->
40-
{
41-
// do nothing
42-
} );
43-
}
14+
import static org.hibernate.cfg.MappingSettings.GLOBALLY_QUOTED_IDENTIFIERS;
4415

16+
@JiraKey( value = "HHH-14276" )
17+
public class NestedIdClassDerivedIdentifiersTest {
4518
@Test
46-
public void testNestedIdClassDerivedIdentifiers() {
47-
doInJPA( this::entityManagerFactory, em ->
48-
{
49-
// do nothing
50-
} );
19+
public void testMapping() {
20+
final Configuration configuration = new Configuration()
21+
.setProperty( GLOBALLY_QUOTED_IDENTIFIERS, Boolean.TRUE )
22+
.addAnnotatedClasses( PlayerStat.class, Score.class );
23+
24+
try (SessionFactory sessionFactory = configuration.buildSessionFactory()) {
25+
sessionFactory.inTransaction( (session) -> {
26+
// do nothing...
27+
} );
28+
}
5129
}
5230
}

0 commit comments

Comments
 (0)