createParents equivilent for MutateIn in 3.x SDK

The 2.x Java SDK’s MutateInBuilder had a createParents parameter on several of the builder methods.

https://docs.couchbase.com/sdk-api/couchbase-java-client-2.3.1/com/couchbase/client/java/subdoc/MutateInBuilder.html#insert-java.lang.String-T-boolean-

I can’t find an equivalent for this in the MutateInOptions or MutateInSpec classes in the 3.x SDK and there’s no mention of it in the migration doc.

Is there a way to get the same functionality in the 3.x version of the SDK? I can get a similar behavior by adding additional MutateInSpecs to the List that create the parent keys manually, but I’d prefer something backwards compatible if possible.

Does MutateInSpec.upsert("foo", "bar").createPath() work for you?

Ahh yes, of course. The method is on the subclasses of MutateInSpec. That’s the one place I didn’t look, and it makes sense since not all the mutations have such a flag. Thanks for the tip in the right direction.