This topic contains 3 replies, has 2 voices, and was last updated by ibratsilo 5 years, 11 months ago.
- Topic
What I want is,
I have defined following in entity PurchaseOrderItem
/**
* @var Product
*
* @ORM\ManyToOne(targetEntity=”Testcompany\Bundle\ProductBundle\Entity\Product”)
* @ORM\JoinColumn(name=”product_id”, referencedColumnName=”id”)
*/
private $productId;My Datagrid
purchase-order-items:
source:
type: orm
query:
select:
– poi
from:
– { table: Testcompany\Bundle\PurchaseOrderBundle\Entity\PurchaseOrderItem, alias: poi }
join:
left:
– { join: Testcompany\Bundle\ProductBundle\Entity\Product, alias: product, conditionType: WITH, condition: “product.id = poi.product_id” }columns:
productId:
label: sp.po.item.product_id.label
frontend_type : integer
poId:
label: sp.po.header.id.label
frontend_type : integer
qty:
label: sp.po.item.order_qty.label
frontend_type : integer
costPrice:
label: sp.po.item.cost_price.label
frontend_type : string
createdAt:
label: sp.po.header.created_at.label
frontend_type: datetime
updatedAt:
label: sp.po.header.updated_at.label
frontend_type: datetimeBut grid data is not showing as I expected. Please if anyone can post steps to joining two tables in OROCRM it will really helpful for me.
thank you,
Chathura
The forum ‘OroCRM’ is closed to new topics and replies.