Skip to content

Instantly share code, notes, and snippets.

@suchitpuri
Created September 24, 2015 10:11
Show Gist options
  • Save suchitpuri/dc8ac0bf799db0c76b56 to your computer and use it in GitHub Desktop.
Save suchitpuri/dc8ac0bf799db0c76b56 to your computer and use it in GitHub Desktop.
import DS from "ember-data";
export default DS.Model.extend({
title: DS.attr('string'),
isbn: DS.attr('string'),
pages: DS.attr('number'),
description: DS.attr('string'),
authors: DS.hasMany('author',{ async: true }),
publisher: DS.belongsTo('publisher',{ async: true }),
reviews: DS.hasMany("review",{ async: true })
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment