tcowin
unread,Mar 1, 2012, 1:46:09 PM3/1/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sonata...@googlegroups.com
I am able to make this work as well, but only if the field name is one word. If it is more than one part, and gets camelcased, I get a 0 in the field on the create form instead of a select and a plus sign.
These are for fields in the same object, each expressing many-to-one relationships. statusOption and outageTypeOption get 0's, while site and service work correctly.
/**
* @var StatusOption
*
* @ORM\ManyToOne(targetEntity="StatusOption")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="status_option_id", referencedColumnName="id")
* })
*/
private $statusOption;
/**
* @var OutageTypeOption
*
* @ORM\ManyToOne(targetEntity="OutageTypeOption")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="outage_type_option_id", referencedColumnName="id")
* })
*/
private $outageTypeOption;
/**
* @var SiteOption
*
* @ORM\ManyToOne(targetEntity="SiteOption")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="site_id", referencedColumnName="id", nullable=true)
* })
*/
private $site;
/**
* @var ServiceOption
*
* @ORM\ManyToOne(targetEntity="ServiceOption")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="service_id", referencedColumnName="id", nullable=true)
* })
*/
private $service;