summaryrefslogtreecommitdiff
path: root/container-compiler-plugin/src/main
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-08-11 10:52:01 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-08-11 10:52:01 +0200
commit238ee120f2220e3359722416df07853baf926a96 (patch)
treec9c6eb17f649ae88d789057457658efed8540f6c /container-compiler-plugin/src/main
parent01557b4626d184f58c492c3d4c1fc74cb9a29a1e (diff)
downloadcontainer-playground-238ee120f2220e3359722416df07853baf926a96.tar.gz
container-playground-238ee120f2220e3359722416df07853baf926a96.tar.bz2
container-playground-238ee120f2220e3359722416df07853baf926a96.tar.xz
container-playground-238ee120f2220e3359722416df07853baf926a96.zip
o Making insertInto actually insert references.
Diffstat (limited to 'container-compiler-plugin/src/main')
-rw-r--r--container-compiler-plugin/src/main/java/io/trygvis/persistence/generators/DaoUtilsGenerator.java6
1 files changed, 3 insertions, 3 deletions
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) {