Browse Source

Merge pull request #842 from gocql/Zariel-patch-1

marshalUDT: allow not using all the UDT fields
Chris Bannister 9 years ago
parent
commit
db6f35eb60
1 changed files with 1 additions and 1 deletions
  1. 1 1
      marshal.go

+ 1 - 1
marshal.go

@@ -1590,7 +1590,7 @@ func marshalUDT(info TypeInfo, value interface{}) ([]byte, error) {
 		for _, e := range udt.Elements {
 			val, ok := v[e.Name]
 			if !ok {
-				return nil, marshalErrorf("missing UDT field in map: %s", e.Name)
+				continue
 			}
 
 			data, err := Marshal(e.Type, val)