Re: Incorrect behavior of delete() method

2010-12-16 Thread Andrew Hodirevski
Project: var $hasAndBelongsToMany = array( 'User' => array( 'className' => 'User', 'joinTable' => 'projects_users', 'foreignKey' => 'project_id', 'associationForeignKey' => 'user_id', 'with' => 'ProjectsUser', 'uni

Re: Incorrect behavior of delete() method

2010-12-15 Thread cricket
2010/12/15 Andrew Hodirevski : > Bump. Anyone can help me? > > On 13 дек, 12:41, Andrew Hodirevski wrote: >> Hello! >> I have three models: >> >> Project >> User >> ProjectsUser >> >> The ProjectsUser table is used for HABTM relations between Project and >> User. >> This is remove() method of Proj

Re: Incorrect behavior of delete() method

2010-12-15 Thread Andrew Hodirevski
Bump. Anyone can help me? On 13 дек, 12:41, Andrew Hodirevski wrote: > Hello! > I have three models: > > Project > User > ProjectsUser > > The ProjectsUser table is used for HABTM relations between Project and > User. > This is remove() method of Project model: > >     function remove($project_id

Re: Incorrect behavior of delete() method

2010-12-15 Thread Andrew Hodirevski
Bump. Anyone can help me? On 13 дек, 12:41, Andrew Hodirevski wrote: > Hello! > I have three models: > > Project > User > ProjectsUser > > The ProjectsUser table is used for HABTM relations between Project and > User. > This is remove() method of Project model: > >     function remove($project_id

Incorrect behavior of delete() method

2010-12-13 Thread Andrew Hodirevski
Hello! I have three models: Project User ProjectsUser The ProjectsUser table is used for HABTM relations between Project and User. This is remove() method of Project model: function remove($project_id, $user_id) { /* * Проверяем, относится ли выбранный проект к пользоват