Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[#1281] Fixed GenericModel's edit method not to remove whole entity s…

…ubfield from parameters if it has empty id parameters provided, eg. entity1.entity2.id: ''
  • Loading branch information...
commit 06c5a9d9cf63109300b6c3e289cecec135d31796 1 parent c1f8573
@oporkka authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 framework/src/play/db/jpa/GenericModel.java
View
4 framework/src/play/db/jpa/GenericModel.java
@@ -147,8 +147,8 @@
} else if (ids != null && ids.length > 0 && ids[0].equals("")) {
bw.set(field.getName(), o, null);
- // Remove it to prevent us from finding it again later
- paramNode.removeChild(field.getName(), removedNodesList);
+ // Remove the id to prevent us from finding it again later
+ fieldParamNode.removeChild(keyName, removedNodesList);
}
}
}

1 comment on commit 06c5a9d

@mbknor

Same solution I came up with but I also have added testcase for it.. I'll go with my fix but thanks a lot anyway!!

Please sign in to comment.
Something went wrong with that request. Please try again.