не работает наследование

Bug #1626055 reported by sergey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jsdata
Fix Released
Undecided
Unassigned

Bug Description

new Model('Converter' , {
  id : {
    type : 'int',
    iskey : true,
    isfrooze : true
  },
  about : {
    type : 'string',
    isfrooze : true
  }
});

new Model('Meter' , {
  id : {
    type : 'int',
    iskey : true
  },
  converter : {
    type : function(v){
      return Converter.id(v)
    },
    isfrooze : true
  },
  is_checked : {
    type : 'bool',
    def : false
  },
  is_checkbox : {
    type : 'bool',
    def : true
  }
});

a = new Meter({id : 10 , converter : 5})
b = new Meter({id : 20 , converter : 5})

new Converter({id : 5 , about : 'test'})
console.log( Converter.id(5) , 'dfdfd')
new Converter({id : 5 , about : 'test2'})
console.log( Converter.id(5) , 'dfdfdf2' )

converterjsdata.js:133:13
Object { id: 5, about: null } Object { id: 5, about: "test" }jsdata.js:147:9
id function TObject.id() 222jsdata.js:159:11
about undefined 222jsdata.js:159:11
Object { id: 5, about: "test" } dfdfdjsdatamodel.js:38:1
Object { id: 5, about: "test" } Object { id: 5, about: "test2" }jsdata.js:147:9
id function TObject.id() 222jsdata.js:159:11
about undefined 222jsdata.js:159:11
Object { id: 5, about: "test2" } dfdfdf2

sergey (vip-karamba)
Changed in jsdata:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.