From 8cca2127e0e11486cc45ae1a8198bd778301f935 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 19 Aug 2013 19:45:28 +0200 Subject: o Dropping the Sequences class. Moving more stuff into SqlUnit to make it easier available in a generic form. o Fixing the complicated cases where the generation got confused with both setter and constructor injection. --- .../test/resources/io/trygvis/persistence/test/basic/ChildEntity.java | 3 +++ .../src/test/resources/io/trygvis/persistence/test/basic/Person.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic') diff --git a/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/ChildEntity.java b/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/ChildEntity.java index 208ee9a..29ce1b2 100644 --- a/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/ChildEntity.java +++ b/container-compiler-plugin/src/test/resources/io/trygvis/persistence/test/basic/ChildEntity.java @@ -1,5 +1,7 @@ package io.trygvis.persistence.test.basic; +import io.trygvis.persistence.sql.SqlConstructor; + import javax.persistence.Entity; @Entity @@ -8,6 +10,7 @@ public class ChildEntity extends ParentEntity { public final int favoriteNumber; + @SqlConstructor public ChildEntity(Long id, String name, int favoriteNumber) { super(id); this.name = name; 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 index 3cbdb84..6b1efb5 100644 --- 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 @@ -30,7 +30,8 @@ public class Person { // @OrderBy("birthDate asc") // private List children = new ArrayList<>(); - public Person(Long id, Date birthDate, Person mother, Gender gender) { + // The parameters is not in the same order as the fields. + public Person(Long id, Person mother, Date birthDate, Gender gender) { this.id = id; this.birthDate = birthDate; this.mother = mother; -- cgit v1.2.3