Menu

2 objects in the DisplayBareRelations query

Sergi
2021-10-28
2021-10-28
  • Sergi

    Sergi - 2021-10-28

    Hi all,
    I'm trying to display a new tab with objects selected in a query overwriting the DisplayBareRelations following this tutorial.
    It works perfect when only selecting one object
    $oSearch = new DBObjectSearch::FromOQL("SELECT object1 JOIN lnkObjetc1ToObject2 ON ..........
    But if my query selects 2 objects
    $oSearch = new DBObjectSearch::FromOQL("SELECT object1, object2 FROM object1 JOIN lnkObjetc1ToObject2 ON........
    It only returns the first object.
    The query tested in the "Run queries" works ok, returning the join of both objects.

    Is it a bug? any workaround?
    Thanks in advance,
    Regards,

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-10-28

    Are you sure you can use SELECT object1, object2 ?

     
    • Sergi

      Sergi - 2021-10-28

      We have done it for reports and it works :)
      I have tested my query in the "Run queries" and it works
      From the documentation https://www.itophub.io/wiki/page?id=2_4_0%3Aoql%3Aexample
      SELECT
      Artist, Book FROM
      Book
      JOIN Artist ON Book.written_by = Artist.id
      WHERE Book.issued > '2001-01-01'

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.