Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Extend Models with relations #368

tyio opened this Issue · 0 comments

1 participant


When you extend a Relational Model that declares a set of relations, those relations are not propagated (added) to a new model. Example:

var M1 = Backbone.RelationalModel.extend({
relations: [
{type: 'Backbone.HasMany',
key: 'things',
relatedModel: SomeModel

var M2 = M1.extend();

Now, M2 does not have the relation 'things'.

Solution to use subtypes is inherently an antipattern of OOP design, because it requires extension model to declare extending ones. How can this be resolved? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.