マイ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