Details
Description
Hi,
When i try to delete some entities attached to an entity I've got the following message.
My entity is specified as follow.
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="Entity\User\Account", inversedBy="memberships")
* @ORM\JoinColumn(name="uid", referencedColumnName="uid")
*/
protected $userAccount;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="Entity\Merchant\Account")
* @ORM\JoinColumn(name="mch_accountid", referencedColumnName="accountid")
*/
protected $merchantAccount;
/**
* @ORM\Column(type="datetime", name="date")
* @var datetime
*/
protected $date;
/**
* @ORM\Column(type="boolean")
* @var boolean
*/
protected $administrator;
/**
* @ORM\ManyToMany(targetEntity="Entity\User\Privilege", indexBy="privilegeid")
* @ORM\JoinTable(name="fsbackend.user_mch_account_privilege",
* joinColumns={
* @ORM\JoinColumn(name="mch_accountid", referencedColumnName="mch_accountid"),
* @ORM\JoinColumn(name="uid", referencedColumnName="uid")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="privilegeid", referencedColumnName="privilegeid")
* }
* )
*/
protected $privileges;
I delete the related entities
$membership->getPrivileges()->clear();
$this->_em->persist($userAccount);
$this->_em->flush();
I tried on doctrine 2.1.7 and the last doctrine version and same thing happens.
Please find attached the error log.
Activity
Marco Pivetta
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
Hi,
When i try to delete some entities attached to an entity I've got the following message. My entity is specified as follow. /** * @ORM\Id * @ORM\ManyToOne(targetEntity="Entity\User\Account", inversedBy="memberships") * @ORM\JoinColumn(name="uid", referencedColumnName="uid") */ protected $userAccount; /** * @ORM\Id * @ORM\ManyToOne(targetEntity="Entity\Merchant\Account") * @ORM\JoinColumn(name="mch_accountid", referencedColumnName="accountid") */ protected $merchantAccount; /** * @ORM\Column(type="datetime", name="date") * @var datetime */ protected $date; /** * @ORM\Column(type="boolean") * @var boolean */ protected $administrator; /** * @ORM\ManyToMany(targetEntity="Entity\User\Privilege", indexBy="privilegeid") * @ORM\JoinTable(name="fsbackend.user_mch_account_privilege", * joinColumns={ * @ORM\JoinColumn(name="mch_accountid", referencedColumnName="mch_accountid"), * @ORM\JoinColumn(name="uid", referencedColumnName="uid") * }, * inverseJoinColumns={ * @ORM\JoinColumn(name="privilegeid", referencedColumnName="privilegeid") * } * ) */ protected $privileges; I delete the related entities $membership->getPrivileges()->clear(); $this->_em->persist($userAccount); $this->_em->flush(); I tried on doctrine 2.1.7 and the last doctrine version and same thing happens. Please find attached the error log. |
Hi,
When i try to delete some entities attached to an entity I've got the following message. My entity is specified as follow. {code} /** * @ORM\Id * @ORM\ManyToOne(targetEntity="Entity\User\Account", inversedBy="memberships") * @ORM\JoinColumn(name="uid", referencedColumnName="uid") */ protected $userAccount; /** * @ORM\Id * @ORM\ManyToOne(targetEntity="Entity\Merchant\Account") * @ORM\JoinColumn(name="mch_accountid", referencedColumnName="accountid") */ protected $merchantAccount; /** * @ORM\Column(type="datetime", name="date") * @var datetime */ protected $date; /** * @ORM\Column(type="boolean") * @var boolean */ protected $administrator; /** * @ORM\ManyToMany(targetEntity="Entity\User\Privilege", indexBy="privilegeid") * @ORM\JoinTable(name="fsbackend.user_mch_account_privilege", * joinColumns={ * @ORM\JoinColumn(name="mch_accountid", referencedColumnName="mch_accountid"), * @ORM\JoinColumn(name="uid", referencedColumnName="uid") * }, * inverseJoinColumns={ * @ORM\JoinColumn(name="privilegeid", referencedColumnName="privilegeid") * } * ) */ protected $privileges; {code} I delete the related entities {code} $membership->getPrivileges()->clear(); $this->_em->persist($userAccount); $this->_em->flush(); {code} I tried on doctrine 2.1.7 and the last doctrine version and same thing happens. Please find attached the error log. |
Jeremie Tom tom
made changes -
| Attachment | AdvancedAssociationTest.php [ 11375 ] |
Jeremie Tom tom
made changes -
| Attachment | patch.diff [ 11377 ] |
Fabio B. Silva
made changes -
| Assignee | Benjamin Eberlei [ beberlei ] | Fabio B. Silva [ fabio.bat.silva ] |
Fabio B. Silva
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.4 [ 10321 ] | |
| Resolution | Fixed [ 1 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2252, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
Jeremie Tom tom is the schema validated by the cli tools?