Using `include` in findRecord throws error
knownasilya opened this issue · 1 comments
knownasilya commented
Having issues using include
with the following request:
this.store.findRecord('idea', ideaId, { include: 'outline' })
});
firestore.js:312 Uncaught (in promise) TypeError: Cannot set property '_included' of undefined
at firestore.js:312
And the model of idea
:
import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
import Blog from './blog';
import OutlineItem from './outline-item';
export default class Idea extends Model {
@attr('string') title!: string;
@attr('string') description!: string;
@attr('date') createdAt!: Date;
@attr('date') updatedAt!: Date;
@hasMany('outline-item', { subcollection: true } as any) outline!: Promise<
OutlineItem[]
>;
@belongsTo('blog') blog!: Promise<Blog>;
}
Tried removing subcollection too, same issue.
knownasilya commented