diff options
Diffstat (limited to 'container-compiler-plugin/src/test/resources')
-rw-r--r-- | container-compiler-plugin/src/test/resources/Car.java | 6 | ||||
-rw-r--r-- | container-compiler-plugin/src/test/resources/Person.java | 26 |
2 files changed, 32 insertions, 0 deletions
diff --git a/container-compiler-plugin/src/test/resources/Car.java b/container-compiler-plugin/src/test/resources/Car.java new file mode 100644 index 0000000..5661bc2 --- /dev/null +++ b/container-compiler-plugin/src/test/resources/Car.java @@ -0,0 +1,6 @@ +import javax.persistence.Entity; + +@Entity +public class Car { + private int year; +} diff --git a/container-compiler-plugin/src/test/resources/Person.java b/container-compiler-plugin/src/test/resources/Person.java new file mode 100644 index 0000000..740b42d --- /dev/null +++ b/container-compiler-plugin/src/test/resources/Person.java @@ -0,0 +1,26 @@ +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OrderBy; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@Entity +public class Person { + @Id + private Long id; + + private Date birthDate; + + @ManyToOne + private Person mother; + + @ManyToOne + private Person father; + + @OneToMany(mappedBy = "id") + @OrderBy("birthDate asc") + private List<Person> children = new ArrayList<>(); +} |