Very strange. I used this method from the teachings hundreds of times. I have a simple controller that takes id as a parameter. The request generated by Doctrine is erroneous and failed.
public function editSellerAction($id)
{
$em = $this->getDoctrine()->getManager();
$seller = $em->getRepository('SiteUserBundle:Seller')->find($id);
$form = $this->createForm(new SellerType(), $seller, array(
'method' => 'POST'
));
}
The generated request is as follows
[2/2] DBALException: An exception occurred while executing 'SELECT t1.id AS id2, t1.username AS username3, t1.password AS password4, t1.firstname AS firstname5, t1.lastname AS lastname6 FROM seller t1 WHERE t0 .id = ? LIMIT 1 'with parameters ["2"]:
SQLSTATE [42S22]: Column not found: 1054 Unknown column 't0.id' in 'where clause' +
, "WHERE t0.id", "WHERE t1.id". t1, phpmyadmin, .
, ?
class Seller extends User
{
protected $customers;
protected $firstname;
protected $lastname;
class User implements UserInterface
{
private $id;
private $username;
private $password;
3 , (, ).