This topic contains 4 replies, has 4 voices, and was last updated by ibratsilo 5 years, 10 months ago.
- Topic
Hi there.
Is it possible to join to a non-related entity in datagrids at all? I have an entity that it doesn’t really make sense to relate to another except in a one-way relationship. However, I want a datagrid of the entity without the relationships with a count of the number of times it’s used through the one-way relationship.
Here is my datagrid:
1234567891011121314151617181920212223242526272829303132333435datagrid:acme-reason-grid:extended_entity_name: %acme.entity.reason.class%source:type: ormacl_resource: acme.reason_viewquery:select:- r.name- r.label- COUNT(tickets.id) AS ticketsCountfrom:- { table: %acme.entity.reason.class% , alias: r}join:left: { join: %acme.entity.ticket.class%, alias: tickets, conditionType: WITH, condition: "r.name = tickets.name" }columns:name:label: acme.zendesk.reason.name.labellabel:label: acme.zendesk.reason.label.labelticketsCount:label: acme.zendesk.reason.count.labelfrontend_type: integersorters:columns:name: { data_name: r.name }label: { data_name: r.label }count: { data_name: ticketsCount }default:name: ASCoptions:entityHint: reasonentity_pagination: trueI saw something done similar in some documentation: https://github.com/orocrm/platform/blob/1.9/src/Oro/Bundle/DataGridBundle/Resources/doc/backend/editable_grid_cells.md
But I get the following error when I try to access a page with that datagrid on it:
Invalid type for path "query.join.left.join". Expected array, but got string
So is it possible to define another entity through the ‘query.join.left.join’ attribute?
Thanks,
Simon
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.