Skip to content

Commit

Permalink
Fix for #47
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Brisbin authored and jbrisbin committed Nov 27, 2012
1 parent 7f1b61c commit 0aacc6d
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -875,9 +875,10 @@ public ResponseEntity<?> createOrUpdate(ServletServerHttpRequest request,
if(null != (entity = repo.findOne(serId))) {
// Updating an existing resource
isUpdate = true;
for(AttributeMetadata attrMeta : (Collection<AttributeMetadata>)repoMeta.entityMetadata()
.embeddedAttributes()
.values()) {
List<AttributeMetadata> attrs = new ArrayList<AttributeMetadata>();
attrs.addAll(repoMeta.entityMetadata().embeddedAttributes().values());
attrs.addAll(repoMeta.entityMetadata().linkedAttributes().values());
for(AttributeMetadata attrMeta : attrs) {
Object incomingVal;
if(null != (incomingVal = attrMeta.get(incoming))) {
attrMeta.set(incomingVal, entity);
Expand Down

0 comments on commit 0aacc6d

Please sign in to comment.