簡単な例です。
/**
* @ORM\Column(name="api_keyID", type="integer", nullable=false)
*/
private $api_keyID;
/**
* @return integer
*/
public function getApi_keyID()
{
return $this->api_keyID;
}
/**
* @param integer $api_keyID
* @return object
*/
public function setApi_keyID($data)
{
$this->api_keyID = $data;
return $this;
}
メソッド名と列名を確認してください。やってみると
//...
->findOneByApi_keyID($some);
次のようなエラーが発生します
Entity 'entity\path' has no field 'apiKeyID'. You can therefore not call 'findOneByApi_keyID' on the entities' repository
では、doctrine \ symfonyはアンダースコアを食べますか?О.оそして私はそれを列名に使用できませんか?