PaulUithol / Backbone-relational

Get and set relations (one-to-one, one-to-many, many-to-one) for Backbone models
http://backbonerelational.org
MIT License
2.34k stars 330 forks source link

SubModelTypes as model constructor or string #579

Closed zsabra closed 7 years ago

zsabra commented 7 years ago

Of all the options that allow you to provide a Model definition, this is one of few that for some reason only allows you to provide it as string.

This change puts this option in line with the rest of the similar options, no longer forcing you to use model scopes.

Notations such as:

subModelTypes: {
    "fade": FadeActionModel
}

were unsupported before.