Fetch data from types that mixin a type


Can a single fetch call retrieve persisted data from all types that mixin a particular type (say, PersistableType).

Would a fetch on PersistableType also return objs from types that extend it and/or types that mix it? If not, how can it be done?



A single fetch can retrieve persisted data from all types that EXTEND a particular PERSISTABLE type. (type Persistable does NOT mixin Persistable)

For example if type Facility extends FixedAsset, then FixedAsset.fetch() will ALSO return all Facility instances.

To fetch everything that mixes in a particular non-persistable type, you could consider something like:

MetadataStore.tag().typesThatMixin("AType").each(function(type) {
1 Like