Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You don't need to join the fields manually because it's done automatically. Check the outputs in the code bellow based on your question:</p> <pre><code>Ext.define('User', { extend: 'Ext.data.Model', fields: [ {name: 'name', type: 'string'}, {name: 'age', type: 'int'}, {name: 'phone', type: 'string'}, {name: 'alive', type: 'boolean', defaultValue: true} ], }); Ext.define('BusinessUser', { extend: 'User', fields: [ {name: 'businessType', type: 'string'}, {name: 'company', type: 'string'} ], }); // instantiating a User object var u = Ext.create('BusinessUser', { name: 'John Doe', age: 30, phone: '555-5555' }); // instantiating a BusinessUser object var bu = Ext.create('BusinessUser', { name: 'Jane Doe', age: 40, phone: '555-5556', businessType: 'analyst', company: 'ACME' }); console.log(Ext.getClassName(bu)); // "BusinessUser" console.log(Ext.getClassName(u)); // "User" console.log(u instanceof User); // true console.log(bu instanceof User); // true console.log(u instanceof BusinessUser); // false console.log(bu instanceof BusinessUser); // true console.log(u instanceof Ext.data.Model); // true console.log(bu instanceof Ext.data.Model); // true console.log(u instanceof Ext.data.Store); // false, just to check if it's not returning true for anything console.log(bu instanceof Ext.data.Store); // false console.log("name" in u.data); // true console.log("name" in bu.data); // true console.log("company" in u.data); // false console.log("company" in bu.data); // true </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload