diff --git a/helpers/map-deep-merge.js b/helpers/map-deep-merge.js
index <HASH>..<HASH> 100644
--- a/helpers/map-deep-merge.js
+++ b/helpers/map-deep-merge.js
@@ -172,7 +172,8 @@ function typeFromList( list ){
 	return list && list._define && list._define.definitions["#"] && list._define.definitions["#"].Type;
 }
 function idFromType( Type ){
-	return Type && Type.algebra && Type.algebra.clauses && Type.algebra.clauses.id && function(o){
+	return Type && Type.connection && Type.connection.id ||
+		Type && Type.algebra && Type.algebra.clauses && Type.algebra.clauses.id && function(o){
 			var idProp = Object.keys(Type.algebra.clauses.id)[0];
 			return o[idProp];
 		} || function(o){
smart-merge: read id usign connection.id