CREATE VIEW `trainingdetail` AS
select `training_detail`.`id` as `id`
,`training`.`id` AS `training_id`
,`training`.`startdate` AS `startdate`
,`training`.`enddate` AS `enddate`
,concat(`training_detail`.`fname`,' ',`training_detail`.`lname`) AS `fullname`
from `training_detail`
left join `training` on ((`training`.`id`=`training_detail`.`training_id_p`))
where `training_detail`.`id` is NOT NULL
I can create this view no issue. but when i try to convert to ORM objects i get this in propel
Column "id" declared twice in table "trainingdetail"
Both Training_detail and Training table has id column
===========================================================
who can solve it?
In the following line:
left join
trainingon ((training.id=training_detail.training_id_p))what does it mean "training_detail.training_id_p".
In the table of training_detail the name of the column is id
you mentioned it: select
training_detail.idasidso here you changed the name of the column.
why?
use the same name.