이상한 문제가 있습니다.symfony 1.4 및 auto_increment 대신 doctrine autoincrement
$this->hasColumn('id', 'integer', 4, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, 'length' => 4, ));
으로 당신이 볼 수
Request: actAs: { Timestampable: ~ } columns: id: { type: integer(4), primary: true, autoincrement: true, notnull: true }
난 내 BaseRequest.class.php
내부 심포니 doctrine:build --all --no-confirmation
을 수행 할 때 오류가 내 id 필드의 선언 중에있다 : 여기
이 문제를 해결할 방법이 있습니까?
는 정확히 당신이이'대신'autoincrement'의 auto_increment'해야 말할 수 있음을합니까? 나는이 모델을'autoincrement' 모델로 가지고 있으며, MySQL에서는'auto_increment'를 볼 수 있습니다. 잘 동작합니다. – greg0ire
그것은 괜찮아요,하지만 내 항목을 저장하려고하면 "마지막으로 삽입 식별자를 얻을 수 없습니다"그리고 내가 auto_increment로 변경되면 작동합니다. – Korangar
새로운 행을 삽입 한 후,'SELECT LAST_INSERT_ID();'가 mysql에서 리턴합니까? – greg0ire