From 137ba20bd9a93143ee20e88b87feb7d5bf1e7d9d Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 9 Sep 2015 11:40:15 -0700 Subject: [PATCH] Clean up models --- app/models/characteristic.js | 4 ++-- app/models/measurement.js | 4 ++-- app/models/strain.js | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/models/characteristic.js b/app/models/characteristic.js index ca4c5d9..8851175 100644 --- a/app/models/characteristic.js +++ b/app/models/characteristic.js @@ -3,8 +3,8 @@ import DS from 'ember-data'; export default DS.Model.extend({ characteristicName : DS.attr('string'), characteristicTypeName: DS.attr('string'), - strains : DS.hasMany('strain', { async: true }), - measurements : DS.hasMany('measurements', { async: true }), + strains : DS.hasMany('strain', { async: false }), + measurements : DS.hasMany('measurements', { async: false }), createdAt : DS.attr('date'), updatedAt : DS.attr('date'), deletedAt : DS.attr('date'), diff --git a/app/models/measurement.js b/app/models/measurement.js index 32ceac5..80b6136 100644 --- a/app/models/measurement.js +++ b/app/models/measurement.js @@ -1,8 +1,8 @@ import DS from 'ember-data'; export default DS.Model.extend({ - strain : DS.belongsTo('strain', { async: true }), - characteristic : DS.belongsTo('characteristic', { async: true }), + strain : DS.belongsTo('strain', { async: false }), + characteristic : DS.belongsTo('characteristic', { async: false }), textMeasurementType: DS.attr('string'), txtValue : DS.attr('string'), numValue : DS.attr('number'), diff --git a/app/models/strain.js b/app/models/strain.js index 1f54647..7bd4e50 100644 --- a/app/models/strain.js +++ b/app/models/strain.js @@ -2,7 +2,8 @@ import DS from 'ember-data'; import Ember from 'ember'; export default DS.Model.extend({ - measurements : DS.hasMany('measurements', { async: true }), + measurements : DS.hasMany('measurements', { async: false }), + characteristics : DS.hasMany('characteristics', { async: false }), species : DS.belongsTo('species', { async: false }), strainName : DS.attr('string'), typeStrain : DS.attr('boolean'),