Devtools generated models don't work


I'm generating a scaffold using devtools.

I choose to use setter/getter method, php as template engine.

However, the view file use property and not methods to get result.


<td><?php echo $user->group_id ?></td>

Should be:

<td><?php echo $user->getGroupId() ?></td>

Tested with lastest devtools and phalcon 1.3


It looks like you are trying to access the properties directly in the view.

If you are using getters and setters, you have to use these.


@gareth I perfectly understand what you are saying, however view files are generated via devtools, is not mine code...

It's scaffold generated code by phalcon devtools.

Models, controllers and view are generated in automatic, but as you can see in wrong way: models are using setter/getter, but view are using proprieties.

Really? I don't usually use the scafflod option because I don't like the way it does CRUD.

Definitely a bug report, then.


thanks, I reported.

I also don't use crud, but since I am playing with phalcon yet, I would test devtools


Why you don't like how crud is generated?

When you go back to the index after saving a record, it does a search for that record, and so you don't see the rest.

The way the models are made is fine, but the controllers are a bit shaky IMHO.


ah ok... I am doing crud especially for generate models

Fixed in Devtools 2.0.x branch