Patch from Rien:
Index: src/main/java/com/avaje/ebeaninternal/server/deploy/id/ImportedIdEmbedded.java===================================================================--- src/main/java/com/avaje/ebeaninternal/server/deploy/id/ImportedIdEmbedded.java (revision 1038)+++ src/main/java/com/avaje/ebeaninternal/server/deploy/id/ImportedIdEmbedded.java (working copy)@@ -113,14 +113,18 @@ if (embeddedId == null){ for (int i = 0; i < imported.length; i++) {+ if (imported[i].owner.isUpdateable()) { request.bind(null, imported[i].foreignProperty, imported[i].localDbColumn, true);+ } } } else { for (int i = 0; i < imported.length; i++) {+ if (imported[i].owner.isUpdateable()) { Object scalarValue = imported[i].foreignProperty.getValue(embeddedId); request.bind(scalarValue, imported[i].foreignProperty, imported[i].localDbColumn, true);+ } } } }Index: src/main/java/com/avaje/ebeaninternal/server/deploy/id/ImportedIdMultiple.java===================================================================--- src/main/java/com/avaje/ebeaninternal/server/deploy/id/ImportedIdMultiple.java (revision 1038)+++ src/main/java/com/avaje/ebeaninternal/server/deploy/id/ImportedIdMultiple.java (working copy)@@ -89,7 +89,9 @@ for (int i = 0; i < imported.length; i++) { Object scalarValue = imported[i].foreignProperty.getValue(bean);- request.bind(scalarValue, imported[i].foreignProperty, imported[i].localDbColumn, true);+ if (imported[i].owner.isUpdateable()) {+ request.bind(scalarValue, imported[i].foreignProperty, imported[i].localDbColumn, true);+ } } }
Fixed in HEAD.