From 238ee120f2220e3359722416df07853baf926a96 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 11 Aug 2013 10:52:01 +0200 Subject: o Making insertInto actually insert references. --- .../java/io/trygvis/persistence/generators/DaoUtilsGenerator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'container-compiler-plugin/src/main/java') diff --git a/container-compiler-plugin/src/main/java/io/trygvis/persistence/generators/DaoUtilsGenerator.java b/container-compiler-plugin/src/main/java/io/trygvis/persistence/generators/DaoUtilsGenerator.java index 51b3879..e4f69b5 100644 --- a/container-compiler-plugin/src/main/java/io/trygvis/persistence/generators/DaoUtilsGenerator.java +++ b/container-compiler-plugin/src/main/java/io/trygvis/persistence/generators/DaoUtilsGenerator.java @@ -87,9 +87,9 @@ public class DaoUtilsGenerator { EntityMirror referenced = unit.get(field.type); FieldMirror idField = referenced.getIdField(); typeHandler = generatorConfiguration.typeHandler(idField.type); - accessor = field.referenceAccessor(o, idField); - setter = " stmt." + typeHandler.setter(i, accessor) + ";"; - accessor = "null"; + accessor = o.name + "." + field.javaName; + String idAccessor = field.referenceAccessor(o, idField); + setter = " stmt." + typeHandler.setter(i, idAccessor) + ";"; } if (field.notNull) { -- cgit v1.2.3