Menu

Unknown key in join condition (left expression), found 'resend_manager_id' in:

2022-10-01
2022-10-02
  • Andrii Romanyshyn

    Hello.
    Created a new field resend_manager_id in the database in the Person table using the instructions in the iTop documentation.
    When I try to make a query everything works fine and I get the result

    SELECT Person AS p
    WHERE p.resend_manager_id = :this->caller_id
    

    But when I make a request

    SELECT Person AS p 
    JOIN Person AS p2 ON p2.resend_manager_id=p.id 
    JOIN Person AS p3 ON p3.resend_manager_id=p2.id 
    WHERE :this->caller_id = p3.id
    

    I get the following result:
    Unknown key in join condition (left expression), found 'resend_manager_id' in: SELECT Person AS p JOIN Person AS p2 ON p2.manager_id=p.id JOIN Person AS p3 ON p3.resend_manager_id=p2.id WHERE :this->caller_id = p3.id, expecting {org_id, location_id, manager_id}
    Please help me get the result for this custom field that I created. This is very important to me.
    Thank you all for your help

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-10-02

    Is your attribute an AttributeExternalKey on the person object?

     
    👍
    1
    • Andrii Romanyshyn

      Hi, Jeffrey
      AttributeInteger

       
      • Jeffrey Bostoen

        Jeffrey Bostoen - 2022-10-02

        That's the issue; joins expect AttributeExternalKey

         
        👍
        1
        • Andrii Romanyshyn

          Yes, it really worked. Thank you very much for your help!

           
          👍
          1

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.