Created
May 18, 2011 16:42
-
-
Save skizzybiz/978967 to your computer and use it in GitHub Desktop.
Model schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sc_require('models/base_model'); | |
Authoring.Nomination = Authoring.BaseWithTimestamps.extend({ | |
// ... | |
reportTemplate: SC.Record.toOne('Authoring.ReportTemplate', { | |
isMaster: NO, | |
key: "report_template_id", | |
inverse: "nominations" | |
}), | |
// ... | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sc_require('models/base_model'); | |
Authoring.ReportTemplate = Authoring.BaseWithTimestamps.extend({ | |
name: SC.Record.attr(String), | |
// more columns... | |
nominations: SC.Record.toMany('Authoring.Nomination', { | |
isMaster: YES | |
}), | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment