Can't inherit models
frysch opened this issue · 2 comments
frysch commented
Hi there.
It seems inheriting models is not allowed.
Example:
In foo.js
:
import Model from '@ember-data/model';
export default class Foo extends Model {}
In foo-bar.js
import Foo from './foo';
export default class FooBar extends Foo {}
Then, when creating a FooBar
:
Using 3.0.0
but tried out 2.0.1
with the same result, with Ember 3.28
Cheers!
Anders
jdoyle65 commented
I've encountered the same issue. Doing some testing it looks like this only occurs on models that don't contain any attributes. For example this produces an error:
import Model from '@ember-data/model';
export default class Foo extends Model {}
However this works just fine:
import Model, { attr } from '@ember-data/model';
export default class Foo extends Model {
@attr bar;
}