OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Datagrid – Join to Non-related Entity

This topic contains 4 replies, has 4 voices, and was last updated by  ibratsilo 5 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34255

    archy_bold
    Participant

    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:

    I 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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #34256

    Mike Kudelya
    Participant

    Hi,

    Try to use this instead your join definition (you are missed “-” symbol):

    #34257

    archy_bold
    Participant

    Ha, I’m an idiot! Thanks for the help. It worked.

    #34258

    chathura
    Participant

    Do we need to create both side relation to joining tables in orocrm ?

    #34261

    ibratsilo
    Moderator

    Hi,
    Such situation is described in the example above – it is not necessarily in this case.

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top