Details
Description
Setting a column name that is different from the property name yields errors in associations (e.g. in a one to one association I get "Undefined index: shipping_id in /var/www/wetawa/library/Doctrine/ORM/UnitOfWork.php on line 1782 Call ")
...
/**
* @Column(type="bigint", name="shipping_id")
*
* @var integer
*/
protected $shippingId=0;
/**
* @OneToOne(targetEntity="Shipping")
* @JoinColumn(name="shipping_id", referencedColumnName="id")
*
* @var Shipping
*/
protected $shipping;
The only way I've been able to get associations to work is by using the default naming so $shipping_id instead of $shippingId
Foreign keys (or discriminator columns) are not intended to be mapped to properties. What do you need $shippingId for?