Open ftKnox opened 7 years ago
Let me see if I understand you correctly.
You want an additional tag that overwrites the json
tag when both exist. Right?
I assume the semantics of that tag should be identical to the json
tag.
If so. This is something that we have been discussing. I'll revive that discussion.
Yeah it's how the gorethink and mgo drivers work for rethinkdb and mongodb.
It would be beneficial and make it more inline with many other go drivers for other databases to use a unique name for the json marshal/unmarshalling. One specific use case is have a particular field used as a query field but I don't want that field saved to the database. In the example below i may have an http request with "parent_container_id" populated to have it search for a particular container, but I don't need that data saved into arangodb. So currently I am forced to build an additional struct just to omit that field.