@@ -52,17 +52,17 @@ protected Collection<Class<?>> annotatedEntities() {
5252 public void testFindSelect (VertxTestContext context ) {
5353 Foo foo = new Foo ( new Bar ( "unique" ) );
5454 test ( context , getSessionFactory ()
55- .withTransaction ( session -> session
56- .persist ( foo )
57- .thenCompose ( v -> session .flush () )
58- .thenAccept ( v -> session .clear () )
59- .thenCompose ( v -> session .find ( Foo .class , foo .id ) )
55+ .withTransaction ( session -> session
56+ .persist ( foo )
57+ .thenCompose ( v -> session .flush () )
58+ .thenAccept ( v -> session .clear () )
59+ .thenCompose ( v -> session .find ( Foo .class , foo .id ) )
6060// .thenApply( result -> {
6161// assertFalse( Hibernate.isInitialized( result.bar) );
6262// return result;
6363// } )
64- .thenCompose ( result -> session .fetch ( result .bar ) )
65- .thenAccept ( bar -> assertEquals ( "unique" , bar .key ) ) )
64+ .thenCompose ( result -> session .fetch ( result .bar ) )
65+ .thenAccept ( bar -> assertEquals ( "unique" , bar .key ) ) )
6666 );
6767 }
6868
@@ -76,7 +76,7 @@ public void testMergeDetached(VertxTestContext context) {
7676 .thenCompose ( result -> getSessionFactory ()
7777 .withTransaction ( session -> session .fetch ( result .bar )
7878 .thenAccept ( b -> assertEquals ( "unique2" , b .key ) )
79- ) ) );
79+ ) ) );
8080 }
8181
8282 @ Test
@@ -85,12 +85,15 @@ public void testMergeReference(VertxTestContext context) {
8585 test ( context , getSessionFactory ()
8686 .withTransaction ( session -> session .persist ( bar ) )
8787 .thenCompose ( i -> getSessionFactory ()
88- .withTransaction ( session -> session .merge ( new Foo ( session .getReference ( Bar .class , bar .id ) ) ) )
88+ .withTransaction ( session -> session .merge ( new Foo ( session .getReference (
89+ Bar .class ,
90+ bar .id
91+ ) ) ) )
8992 )
9093 .thenCompose ( result -> getSessionFactory ()
91- .withTransaction ( session -> session .fetch ( result .bar )
92- .thenAccept ( b -> assertEquals ( "unique3" , b .key ) )
93- ) ) );
94+ .withTransaction ( session -> session .fetch ( result .bar )
95+ .thenAccept ( b -> assertEquals ( "unique3" , b .key ) )
96+ ) ) );
9497 }
9598
9699 @ Test
@@ -99,13 +102,13 @@ public void testPersistReference(VertxTestContext context) {
99102 test ( context , getSessionFactory ()
100103 .withTransaction ( session -> session .persist ( bar ) )
101104 .thenCompose ( i -> getSessionFactory ()
102- .withTransaction ( session -> {
105+ .withTransaction ( session -> {
103106 Foo foo = new Foo ( session .getReference ( Bar .class , bar .id ) );
104107 return session .persist ( foo ).thenApply ( v -> foo );
105108 } )
106109 )
107110 .thenCompose ( result -> getSessionFactory ()
108- .withTransaction ( session -> session .fetch ( result .bar )
111+ .withTransaction ( session -> session .fetch ( result .bar )
109112 .thenAccept ( b -> assertEquals ( "unique3" , b .getKey () ) )
110113 ) ) );
111114 }
0 commit comments