This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I am trying to join two tables to do a query:
public function findByFile_Ref_Id($query) {
$query = $query['ids'];
$q = $this->createQueryBuilder('h');
$result = $q
->leftJoin('h.file_ref_id', 'k')
//->add('where', $q->expr()->in('k.product_code', $query))
->getQuery()
->getResult();
//dump($result);die;
return $result;
}
I'm using a many-to-one unidirectional association:
/**
* @ORM\ManyToOne(targetEntity="KstoreHikashopProduct", inversedBy="hikashopFile")
* @ORM\JoinColumn(name="file_ref_id", referencedColumnName="product_id")
* @ORM\Column(type="integer")
*/
private $file_ref_id;
how is this possible?! what am I doing wrong?
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/PHPhelp/com...