We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    I see you have:

    <aggregate alias="teamName"


    So you will need:

    [{"alias":"teamName"}]


    and a new column with this field: 'teamName_name'
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 42049 ☆ A M B ☆
      • 250 Posts
      Thanks bruno, tried that but still get the same error sad

      No foreign key definition for parentClass: Roster using relation alias: Team
        GEL STUDIOS
        MODX Professional | MODX Ambassador

        Website | Email | Twitter | Facebook
        • 4172
        • 5,888 Posts
        I see you have rosters and team in different schemas/packages.
        You should have them all in one xml-schema and in one package.

        If that's not possible for some reason, you may need to make sure to load both packages.
        The default processors of MIGXdb does only load the package, which is defined with the MIGX-configuration.

        Otherwise xpdo doesn't know anything about the other table.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 42049 ☆ A M B ☆
          • 250 Posts
          Quote from: Bruno17 at Apr 14, 2013, 12:46 PM
          I see you have rosters and team in different schemas/packages.
          You should have them all in one xml-schema and in one package.

          If that's not possible for some reason, you may need to make sure to load both packages.
          The default processors of MIGXdb does only load the package, which is defined with the MIGX-configuration.

          Otherwise xpdo doesn't know anything about the other table.

          Thats where I've been going wrong - gotcha, brilliant explanation too.

          Thanks again for all your help Bruno - do you have a "buy me a beer"/similar link?
            GEL STUDIOS
            MODX Professional | MODX Ambassador

            Website | Email | Twitter | Facebook
            • 40045
            • 534 Posts
            Is it possible to add the fields from the other table to the db filter? so something like that:

            {"teamName_name:LIKE":"%[[+search]]%"}


            I just tried that and it seems to break the search functionality, as soon as I remove that "external" field from the DB filter JSON it works again...maybe doing something wrong?
              • 4172
              • 5,888 Posts
              if 'teamName' is the alias and 'name' the fieldname this should do it:
              {"teamName.name:LIKE":"%[[+search]]%"}

                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 40045
                • 534 Posts
                ha =), close, works perfectly! Thanks again Bruno!