Fixed issue where a union of document models would be distributed as a union of collections instead of a collection with a union of document models. As a side effect, the old type did not allow multiple document types to be inserted, updated or retrieved.
Expected behavior should be as follows:
interface A { ... }
interface B { ... }
interface C { ... }
type ExpectedType = Collection<A | B | C>
// MongoCollection<A | B | C>
Old behavior causes the type to be distributed as:
interface A { ... }
interface B { ... }
interface C { ... }
type OldType = Collection<A | B | C>
// MongoCollection<A> | MongoCollection<B> | MongoCollection<C>
Fixed issue where a union of document models would be distributed as a union of collections instead of a collection with a union of document models. As a side effect, the old type did not allow multiple document types to be inserted, updated or retrieved.
Expected behavior should be as follows:
Old behavior causes the type to be distributed as: