Below PHP/Doctrine query is not working properly
$q = Doctrine_Query::create();
$q->from('EEvaluationround ER');
$q->leftJoin('ER.EEvaluationroundUser ERU');
$q->where('ER.job_id = ? and ER.active = 1 and (ERU.user_id = ? or ER.leader_user_id = ?)', array($this->job_id, $user->user_id, $user->user_id));
$res = $q->execute();
in schema.yml we have this
EEvaluationround:
tableName: e_evaluationround
columns:
evaluationround_id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: true
job_id:
type: integer(4)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
roundtype_id:
type: integer(4)
fixed: false
unsigned: false
primary: false
default: '10'
notnull: true
autoincrement: false
leader_user_id:
type: integer(4)
fixed: false
unsigned: false
primary: false
default: '0'
notnull: true
autoincrement: false
autoadd:
type: integer(1)
fixed: false
unsigned: true
primary: false
default: '0'
notnull: true
autoincrement: false
active:
type: integer(1)
fixed: false
unsigned: true
primary: false
default: '1'
notnull: true
autoincrement: false
evaluationround_name:
type: string(30)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations:
Job:
local: job_id
foreign: job_id
EEvaluationroundUser:
tableName: e_evaluationround_user
columns:
evaluationround_id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: false
user_id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: false
active:
type: integer(1)
fixed: false
unsigned: true
primary: false
default: '1'
notnull: true
autoincrement: false
relations:
EEvaluationround:
local: evaluationround_id
foreign: evaluationround_id
Is there any issue with Left join syntax, it is throwing below error in log
[Thu Mar 25 07:37:31.544467 2021] [php7:notice] [pid 15834] [client 10.202.9.10:18298] Unknown record property / related component "
\nalias : EEvaluationround\nforeign : evaluationround_id\nlocal : evaluationround_id\nclass : EEvaluationround\ntype : 0\ntable : Object(EEvaluationroundTable)\nlocalTable : Object(EEvaluationroundUserTable)\nname : \nrefTable : \nonDelete : \nonUpdate : \ndeferred : \ndeferrable : \nconstraint : \nequal : \ncascade : Array\nowningSide : \nrefClassRelationAlias : \nforeignKeyName : \norderBy : \n" on "EEvaluationroundUser", referer:
[Thu Mar 25 07:37:31.544608 2021] [php7:error] [pid 15834] [client 10.202.9.10:18298] PHP Fatal error: Cannot declare class Swift, because the name is already in use in /home/project/code/symfony/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift.php on line 18, referer: