On 2 October 2014 01:31, Kapil Thangavelu <[email protected]>
wrote:

> it feels a little strange to use a mutable object for an immutable field.
> that said it does seem functional. although the immutability speaks to the
> first disadvantage noted for the separate fields namely becoming out of
> sync, which afaics isn't something that's possible with the current model,
> ie. a change of name needs to generate a new doc. Names (previous _id) are
> unique in usage minus the extant bug that unit ids are reused. even without
> that the benefits to avoiding the duplicate doc data and manual parse on
> every _id seem like clear wins for subdoc _ids.
>

Just to be really sure, I added a test that exercises the case of one of
the _id fields changing. See TestAttemptedIdUpdate in the (just updated)
gist. MongoDB stops us from doing anything stupid (as expected).
-- 
Juju-dev mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to