File tree 1 file changed +43
-0
lines changed
tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/innerclass
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ * Copyright Red Hat Inc. and Hibernate Authors
4
+ */
5
+ package org .hibernate .processor .test .data .innerclass ;
6
+
7
+ import jakarta .data .page .Page ;
8
+ import jakarta .data .page .PageRequest ;
9
+ import jakarta .data .repository .DataRepository ;
10
+ import jakarta .data .repository .Find ;
11
+ import jakarta .data .repository .Repository ;
12
+ import jakarta .persistence .Entity ;
13
+ import jakarta .persistence .Id ;
14
+ import org .hibernate .processor .test .util .CompilationTest ;
15
+ import org .hibernate .processor .test .util .WithClasses ;
16
+ import org .junit .Test ;
17
+
18
+ import static org .hibernate .processor .test .util .TestUtil .assertMetamodelClassGeneratedFor ;
19
+ import static org .hibernate .processor .test .util .TestUtil .getMetaModelSourceAsString ;
20
+
21
+ public class InnerRepositoryTest extends CompilationTest {
22
+
23
+ @ Test
24
+ @ WithClasses ({Thing .class , ThingRepo .class })
25
+ public void test () {
26
+ System .out .println ( getMetaModelSourceAsString ( ThingRepo .class ) );
27
+ assertMetamodelClassGeneratedFor ( ThingRepo .class );
28
+ }
29
+
30
+ @ Entity
31
+ public static class Thing {
32
+ @ Id
33
+ Long id ;
34
+
35
+ String data ;
36
+ }
37
+
38
+ @ Repository
39
+ public interface ThingRepo extends DataRepository <Thing , Long > {
40
+ @ Find
41
+ Page <Thing > thing (PageRequest pageRequest );
42
+ }
43
+ }
You can’t perform that action at this time.
0 commit comments