내 schema.yml 파일교리의 관계는 어떤 조직이 저장된 정수 값 0을 가지고 그런 organisation_id이없는 문자열
Organisation:
columns:
id: { type: integer(4), notnull: true, unique: true, primary: true, autoincrement: true }
name: { type: string(100), notnull: true, unique: true }
parent_organisation_id: { type: integer(4), notnull: false }
relations:
ParentOrganisation: { class: Organisation, local: parent_organisation_id, foreignAlias: ChildOrganisations }
반환합니다. 놀랍게도이 코드를 실행하면
class organisationActions extends autoOrganisationActions{
public function executeEdit(sfWebRequest $request){
$this->organisation = $this->getRoute()->getObject();
$p = $this->organisation->getParentOrganisationId();
var_dump($p);
결과는 문자열 (1) "0"
왜이 정수를 반환하지 않는, 그래서 === 0
안녕하세요 @ jdog, 어떤 환경과 스택을 사용합니까? PHP 버전, sf 버전 (1.4 가정 ...), propel 또는 교리? mysql 또는 postgres? 그래서 난 당신의 문제를 복제 할 수 있습니다 .... – Matteo
안녕하세요 @ jdog, 내 대답은 어떨까요? – Matteo
안녕하세요 @ jdog 모든 뉴스? – Matteo