I had Read the CAKEPHP Convention. So I changed from the wrong convention to the right.
However I still unsure If I name my ID correctly because now my model still need to use "$primaryKey" to override for the Delete Method.
Model: EventDate
Controller: EventDatesController
Database Table: event_dates
event_dates ID : event_date_id
Secondly, After I change the table col_id name , my Edit Method Query the Where clause for the primary key still remain old primary key name. Try to delete cache but still can't work.
SQL Query: SELECT `EventDate`.`event_date_id`, `EventDate`.`event_date`, `EventDate`.`Created`, `EventDate`.`modified` FROM `fyp_seatmanagment`.`event_dates` AS `EventDate` WHERE `EventDate`.`eventdate_id` = '65' LIMIT 1
As far as I know the naming convention for the primary key is just
id. So your event_dates ID shout just beidinstead ofevent_date_id.To your second part: You named your ID
event_date_idbut looking foreventdate_idin your where-clause. So you forgot a_there. If you change your primary key toid(see above) then don't to forget to fix your statement.