pouchdb-community / ember-pouch

PouchDB/CouchDB adapter for Ember Data
Apache License 2.0
281 stars 76 forks source link

How to add new DS attributes dynamically in ember-pouch model #233

Open LowBP opened 6 years ago

LowBP commented 6 years ago

I am working on table, I want to create a single model for multiple tables with different DS attributes. how can i handle this. ex: table1 model is column

import {  Model  } from 'ember-pouch';
export default Model.extend({
    abc: DS.attr('string'),
    bcd: DS.attr('number'),
    abcd: DS.attr('date') 
})

The same model column for table2 but DS.attribute is not same as table1 ex:

 import {  Model  } from 'ember-pouch';
 export default Model.extend({
    abc: DS.attr('number'),
    bcd: DS.attr('date'),
    abcd: DS.attr('boolean') 
 })