FirebaseExtended/emberfire

Using `include` in findRecord throws error

knownasilya opened this issue · 1 comments

Having issues using include with the following request:

this.store.findRecord('idea', ideaId, { include: 'outline' })
    });

Screen Shot 2020-06-24 at 4 56 41 PM

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.

So got the include working p=without error but the findHasMany doesn't return any results, either with or without subcollection enabled. Data looks like so:

Screen Shot 2020-06-24 at 9 27 38 PM

Screen Shot 2020-06-24 at 9 27 56 PM