Devtools generated models don't work

Hi

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.

Example:

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

Should be:

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

Tested with lastest devtools and phalcon 1.3

http://www.tiikoni.com/tis/view/?id=9d3e9a1

Thanks

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.



5.2k

@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.

https://github.com/phalcon/phalcon-devtools



5.2k

thanks, I reported.

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



5.2k

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.



5.2k

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

Fixed in Devtools 2.0.x branch