sonata-project/SonataAdminBundle — Issue #482: Query Exception with multiple keys?
Author: johnbenz13
Created: 2012-01-10 09:06:16+00:00
State: open

The exception message I get:
1/2 QueryException: [Semantical Error] line 0, col 41 near 'jobpost FROM': Error: 'jobpost' is not defined.

2/2 Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("[Semantical Error] line 0, col 41 near 'jobpost FROM': Error: 'jobpost' is not defined.") in "SonataAdminBundle:CRUD:base_list.html.twig" at line 28

My Entity

/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="Beavoo\UserBundle\Entity\Individual", inversedBy="jobpostCandidateStatuses")
* @ORM\JoinColumn(name="individual_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $candidate;

/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="Jobpost", inversedBy="jobpostCandidateStatuses")
* @ORM\JoinColumn(name="jobpost_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $jobpost;

/**
* @ORM\Column(type="integer")
*
*/
protected $status;

and in my Admin Class:

public function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('jobpost')
->addIdentifier('candidate')
->add('status')

->add('_action','actions',array(
'actions'=>array(
'view'=>array(),
'edit'=>array(),
'delete'=>array()
)
))
;
}

By the way I can create a new entity but I can get to list them.
Is this because I'm using 2keys ?
Thanks