Using subdocument _id fields for multi-environment support
roger peppe
roger.peppe at canonical.com
Wed Oct 1 12:50:27 UTC 2014
On 1 October 2014 13:31, Kapil Thangavelu
<kapil.thangavelu at canonical.com> wrote:
> it feels a little strange to use a mutable object for an immutable field.
The field is neither more or less mutable than the original approach.
Strings are mutable too.
FWIW it would be entirely possible, if deemed desirable, to represent
the id as a struct in Go but encode it as a string in mongo,
by implementing bson.Setter and bson.Getter interfaces on the type.
It sounds like that's not necessary though.
More information about the Juju-dev
mailing list