We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a speciality model class:
class Persons.Models.Speciality extends Backbone.RelationalModel paramRoot: 'speciality' relations: [ type: Backbone.HasMany key: 'services' relatedModel: 'Persons.Models.Service' collectionType: 'Persons.Collections.Services' includeInJSON: false autoFetch: true reverseRelation: key: 'speciality_id', includeInJSON: 'id' ] Persons.Models.Speciality.setup()
It has many relations to services
class Persons.Routers.Services extends Backbone.Router initialize: -> @specialities = new Persons.Collections.Specialities() @specialities.fetch({reset: true}) view = new Persons.Views.ServicesNew({collection: @specialities})
A view class
class Persons.Views.ServicesNew extends Backbone.View template: JST['cpanel/templates/services/new'] events: "submit #new-service": "save" constructor: (options) -> super(options) console.log @collection @model = new @collection.model() console.log @model @model.bind("change:errors", () => this.render() )
In Console, console.log @model
It only returns services relational atributes not speciality attributes.
Anything Am I doing something wrong here?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a speciality model class:
It has many relations to services
A view class
In Console,
console.log @model
It only returns services relational atributes not speciality attributes.
Anything Am I doing something wrong here?
The text was updated successfully, but these errors were encountered: