#5911: deleteAll problem with $primaryKey variable
-------------------------------+--------------------------------------------
    Reporter:  wermail         |         Owner:                
        Type:  Bug             |        Status:  reopened      
    Priority:  High            |     Milestone:  1.2.x.x       
   Component:  Model           |       Version:  RC4           
    Severity:  Normal          |    Resolution:                
    Keywords:                  |   Php_version:  PHP 4 >= 4.3.2
Cake_version:  1.2.0.7945 RC4  |  
-------------------------------+--------------------------------------------
Changes (by wermail):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 Hello,
 How I can do this?

 I can say that model name is UserProject(file name is user_project.php)
 When I am using method deleteAll() for this model I get:

 =====================================================

 SELECT `UserProject`.`id` FROM `UserProject` AS `UserProject` WHERE
 `ProjectId` = 2
 1054: Unknown column 'UserProject.id' in 'field list'

 =====================================================

 And on the same page I see in the debug info

 =====================================================

 SELECT `User`.`UserId`, `User`.`UserLogin`, `User`.`UserPassword`,
 `User`.`UserEmail`, `User`.`UserManager`, `UserProject`.`UserProjectId`,
 `UserProject`.`UserId`, `UserProject`.`ProjectId` FROM `User` AS `User`
 JOIN `UserProject` AS `UserProject` ON (`UserProject`.`ProjectId` = 2 AND
 `UserProject`.`UserId` = `User`.`UserId`) WHERE 1 = 1

 =====================================================


 How we can see in this query primary filed is correct.

 What I must make to help you find a problem?
 I found from which revision start problem, in which method.

 I guess it is something in model name, because only in this model I am
 using two words(UserProject).

 Let me know how I can help you.
 Thank you.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5911#comment:2>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to