View Full Version : sencha generate model syntax for idProperty and validations

4 Nov 2012, 6:56 AM
When I generate my models for example :

sencha generate model User guid,name,email

How can I mark the field that represents the primary key so that sencha cmd would also generate the idProperty in my model. The same question goes for generating validations with sencha cmd.


6 Nov 2012, 6:13 AM
From the CLI, you will not be able to define the idProperty and validations. You will need to specify the fields and then edit the model file to add that in.

This is for Ext JS 4 and Sencha Touch 2

6 Nov 2012, 6:59 AM
Ok, thanks

26 Dec 2012, 8:12 AM
I'm doing tests with the tools to generate sencha multiple applications in an ERP which is composed of more than 3k tables that have a different standard modeling database and edit a file at a time and set the idproperty would be hard work.