diff --git a/goextVersion.go b/goextVersion.go index c5426ff..fc9ff0f 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.149" +const GoextVersion = "0.0.150" -const GoextVersionTimestamp = "2023-06-07T17:45:45+0200" +const GoextVersionTimestamp = "2023-06-07T17:48:36+0200" diff --git a/wmo/reflection.go b/wmo/reflection.go index 7793ac1..47dc17f 100644 --- a/wmo/reflection.go +++ b/wmo/reflection.go @@ -4,6 +4,7 @@ import ( "gogs.mikescher.com/BlackForestBytes/goext/langext" "gogs.mikescher.com/BlackForestBytes/goext/reflectext" "reflect" + "strings" ) func (c *Coll[TData]) init() { @@ -32,7 +33,13 @@ func (c *Coll[TData]) initFields(prefix string, rval reflect.Value, idxarr []int } bsonkey, found := rsfield.Tag.Lookup("bson") - if !found || bsonkey == "-" { + if !found { + continue + } + if strings.Contains(bsonkey, ",") { + bsonkey = bsonkey[:strings.Index(bsonkey, ",")] + } + if bsonkey == "-" { continue }