Re: fail to raise PDOException

2015-12-01 Thread urulab
SOLVED: Namespaces! \Exception instead Exception On Friday, November 27, 2015 at 3:02:34 PM UTC-3, uru...@gmail.com wrote: > > > Env: Cake 3.1.4, PHP 5.6.14 > > //template > Form->postLink('Delete', ['action' => 'delete', $user->id], [ > 'confirm' => __('Are you sure you want to proceed?')]) ?>

fail to raise PDOException

2015-11-27 Thread urulab
Env: Cake 3.1.4, PHP 5.6.14 //template Form->postLink('Delete', ['action' => 'delete', $user->id], [ 'confirm' => __('Are you sure you want to proceed?')]) ?> //controller public function delete($id = null) { $this->request->allowMethod(['post', 'delete']); $user = $this->Users->get($id);

Re: SQL autojoin to ORM Cake3

2015-09-23 Thread urulab
SOLVED In belongsTo table I add: $this->hasMany('TopLogs', [ 'className' => 'Logs', 'strategy' => 'select', 'conditions' => function ($exp, $query) { $query->leftJoin( ['TmpLogs' => 'logs'], [

SQL autojoin to ORM Cake3

2015-09-23 Thread urulab
Hi, I have this SQL a need to transform to ORM. I I appreciate any approach LOGS id - group_id - data 11 'Lorem ipsum 1' 21 'Lorem ipsum 2' 32 'Lorem ipsum 3' SQL return the latest record in your group: id - group_id - data 21 'Lorem ipsum 2'

Re: data migration issue

2015-04-17 Thread urulab
Thanks Lorenzo, I already had read Mass Assignment on the book! bake write: protected $_accessible = [ 'article' => true, 'tag' => true, ]; should be: protected $_accessible = [ '*' =>

data migration issue

2015-04-16 Thread urulab
When I try to load data into a migration I get the following error message: [RuntimeException] Cannot insert row, some of the primary key values are missing. Got (, ), ex pecting (article_id, tag_id) from this code: table('articl

Re: The request has been black-holed

2012-06-15 Thread urulab
This situation is related to Security component. Test before disabling on chat controller http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#disabling-the-csrf-protection I have similar situation for ajax request and put this on beforeFilter in AppController // Di