I have a delegate class in crewqualifications.php as follows.
- Code: Select all
<?php
class tables_crewqualifications {
function __sql__(){
return "select cq.*, c.CrewName from crewqualifications cq
left join crews c on cq.CrewID=c.CrewID"
;}
}
?>
The above simply allows me to have see a Crew Name so I don't have to use a CrewID. It works. Simple.
Then, I add a column of "Test" to CrewQualifications and I get the following error in its entirety.
Fatal error: Uncaught exception 'Exception' with message 'Unknown column 'crewqualifications.Test' in 'field list'Error loading related records for relationship 'Qualifications' in table 'crews'. There was a problem performing the sql query 'select `crewqualifications`.`CrewID`, `crewqualifications`.`CrewName`, `crewqualifications`.`Maintenance`, `crewqualifications`.`Repairs`, `crewqualifications`.`Construction`, `crewqualifications`.`Inspections`, `crewqualifications`.`Labor`, `crewqualifications`.`Supplier`, `crewqualifications`.`Industries`, `crewqualifications`.`Test` from `dataface__view_68c8624cdad67c07b2262817d9cdcfc1` as `crewqualifications` where `CrewID` = 'crew-000003' LIMIT 0,30'. The Mysql error returned was 'Unknown column 'crewqualifications.Test' in 'field list''
' in /var/www/office.alacarte/dataface/Dataface/Record.php:706 Stack trace: #0 /var/www/office.alacarte/dataface/Dataface/Record.php(935): Dataface_Record->_loadRelatedRecordBlock('Qualifications', 0, 0, 0) #1 /var/www/office.alacarte/datafa in /var/www/office.alacarte/dataface/Dataface/Record.php on line 706
Renaming the delegate class makes the error (and the effects of the delegate class) go away. I'm confused as to why adding a column causes this error? Any ideas as to where to look or why its doing it?