LerochkaKapito / extjs-bundle

Use ExtJs with Symfony 2
MIT License
21 stars 18 forks source link

add Annotation/Model/Field Class #18

Closed AmsTaFFix closed 11 years ago

AmsTaFFix commented 11 years ago

Stupid problem №1

I have to provide feature to change PK of Entity... Solution:

  1. set up generate model as base
  2. create model1.js with base-model inheritance
  3. add two fields old_id, new_id
  4. add some hooks in controllers

    Stupid Problem №2

i have to use checkcolumn with integer field (this field contains only 0 and 1), but checkcolumn don't want work properly with integer Solution:

  1. set up generate model as base
  2. create model2.js with base-model inheritance
  3. replace field with type = boolean.

    REAL PROBLEM

When we have 2 entities generated as base, and have association ManyToOne (Page<-Book), and when try to load from server Page with Book asssociation, ExtJS not setting up Book in Page Model, and when i try to call getBook(), ExtJS send request to server for this Book...

I maybe mistaken, but i don't know another solution.

And this solution is useful feature