Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @param int $groupId
- * @param int $entityId
- */
- public function dropReferenceDataByGroupAndEntityId($groupId, $entityId) {
- $rsm = new ResultSetMappingBuilder($this->getEntityManager());
- $rsm->addRootEntityFromClassMetadata('AppBundle:ReferenceData', 'rd');
- $this
- ->getEntityManager()
- ->createNativeQuery(
- ' DELETE FROM ' . $this->getMappingTableName() .
- ' WHERE '.
- ' group_id = :groupId AND ' .
- $this->getEntityIdColumnName() .' = :entityId ', $rsm)
- ->setParameter('groupId', $groupId)
- ->setParameter('entityId', $entityId)
- ->execute();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement