php - Symfony2.4 Doctrine Pull Attribute from a Table Other Than the Entity Table -
let's have object a.
/** * @table(name="a") * repo class definition annotation here **/ class { /** * @column(name="id") * ... etc **/ private $id; /** * pulled table. not entity, decimal value */ private $otherthingfromanothertable; }
how can pull $otherthingfromanothertable
table other_table
using orm annotations? it's not entity, it's decimal value.
i've got following annotations, far:
* @orm\onetoone(targetentity="??") * @orm\jointable(name="other_table", * joincolumns={ * @orm\joincolumn(name="offer_id", referencedcolumnname="id") * } * )
currently, using raw queries in repo class can use through entity manager. unfortunately, returns array, not object. i'd able use $this->em->repo->find($id)
, have pull automatically instead of custom method.
Comments
Post a Comment