summaryrefslogtreecommitdiff
path: root/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/Person.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/Person.java')
-rw-r--r--container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/Person.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/Person.java b/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/Person.java
new file mode 100644
index 0000000..3cbdb84
--- /dev/null
+++ b/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/Person.java
@@ -0,0 +1,39 @@
+package io.trygvis.persistence.test.basic;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.SequenceGenerator;
+import java.util.Date;
+
+@Entity
+@SequenceGenerator(name = "id_seq")
+public class Person {
+ @Id
+ public Long id;
+
+ public Date birthDate;
+
+ @ManyToOne
+ public Person mother;
+
+ enum Gender {
+ MALE, FEMALE
+ }
+
+ public final Gender gender;
+
+// @ManyToOne
+// public Person father;
+
+// @OneToMany(mappedBy = "id")
+// @OrderBy("birthDate asc")
+// private List<Person> children = new ArrayList<>();
+
+ public Person(Long id, Date birthDate, Person mother, Gender gender) {
+ this.id = id;
+ this.birthDate = birthDate;
+ this.mother = mother;
+ this.gender = gender;
+ }
+}