Re: Help saving data with CakePHP 3.0 ORM

2014-02-05 Thread Alberto Pagliarini
Yeah! using Entity class and $_accessible property all works as expected! thanks José 2014-02-04 José Lorenzo jose@gmail.com: Currently that is the most confusing part of the ORM and I'd like to make it easier to understand in the next release preview. By default entities are protected

Re: Help saving data with CakePHP 3.0 ORM

2014-02-05 Thread Alberto Pagliarini
Hi Carlos, PHP 5.4 permits the ['key' = 'value'] array syntax. The issue I had was resolved by using Entity class and $_accessible property. 2014-02-04 Carlos Javier Baeza Negroni carlos.ba...@gmail.com: Also check the array: $data = ['name' = 'Walter White']; Should be: $data =

Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread bato
Hi, I'm starting to play with 3.0 ORM and I encountered some issues saving data. I have two simple tables: - authors with fields id and name - posts with fields id, title, text and author_id I have fill tables with two authors and some posts by hand to try retrieving data with cake.

Re: Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread José Lorenzo
Currently that is the most confusing part of the ORM and I'd like to make it easier to understand in the next release preview. By default entities are protected agains mass assignment, this means that you cannot create them without configuring what properties can be set from the request. You

Re: Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread Carlos Javier Baeza Negroni
Also check the array: $data = ['name' = 'Walter White']; Should be: $data = array('name' = 'Walter White'); best regards. 2014-02-04 José Lorenzo jose@gmail.com: Currently that is the most confusing part of the ORM and I'd like to make it easier to understand in the next release