We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36502 ☆ A M B ☆
    • 491 Posts
    Hi,
    I have a package already developed that work with 3 tables.

    I'd like to give user the chance to add a record in only one table through tv and I love migxdb...
    so inside migxdb configuration I created a new package, with a different name, and a schema, with the same table reference but different package and class names.

    It works fine and it adds the records, but actually it doesn't retrieve them...
    do I have to change something in the getlist processors? or does the table need some extra field?

    Thanks! [ed. note: tillilab last edited this post 12 years, 3 months ago.]
      TilliLab | MODX Ambassador
      website
      • 4172
      • 5,888 Posts
      what is your schema and your exported MIGX-configuration?

      btw.: can't you just use your existing schema, as is, for use with MIGXdb?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36502 ☆ A M B ☆
        • 491 Posts
        Hi, I found out that I must add the field "deleted" to my table, is it correct?


        Quote from: Bruno17 at Jun 27, 2014, 04:53 AM
        btw.: can't you just use your existing schema, as is, for use with MIGXdb?

        I found some problems using the same schema, may be because there are 3 tables connected? If you tell me it should work anyway I'll try again! smiley
          TilliLab | MODX Ambassador
          website
          • 4172
          • 5,888 Posts
          you need the field 'deleted' only, when you use the action-button 'toggleThrash'

          Does this make sense?


          Normally, you shouldn't need to create an extra schema, just for use with MIGXdb.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 36502 ☆ A M B ☆
            • 491 Posts
            Quote from: Bruno17 at Jun 27, 2014, 05:01 AM
            you need the field 'deleted' only, when you use the action-button 'toggleThrash'

            No it didn't work at all, in the error log I found "Unknown column 'myTest.deleted' in 'where clause"...


            Quote from: Bruno17 at Jun 27, 2014, 05:01 AM
            Normally, you shouldn't need to create an extra schema, just for use with MIGXdb.

            ah... you mean that I can avoid the "package manager" section and create directly the MIGX-config or that I have to create a new package and use the existent schema?..
              TilliLab | MODX Ambassador
              website
              • 4172
              • 5,888 Posts
              the getlist - processor does only check for the 'deleted' - field, if you have selected the action 'toggleThrash' in your configuration.

              Otherwise it should work without a deleted - field.

              And yes, you can just use existing schemas.
              You only need to add the name of your existing package into the MIGXdb-config 'package'
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 36502 ☆ A M B ☆
                • 491 Posts
                ok, sorry I didn't understand that "toogleThrash" was in the setting, you are right, it works perfect!

                As regards the existing schema I'm afraid it doesn't work because my component with db schema is out of the core folder: I get the error
                "components/migx/connector.php) Could not load class: myClass from mysql.myclass."
                does it make sense?

                thanks again
                  TilliLab | MODX Ambassador
                  website
                  • 4172
                  • 5,888 Posts
                  maybe you could register your package as a extension-package with the system-setting 'extension_packages'.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 36502 ☆ A M B ☆
                    • 491 Posts
                    perfect! Thank you!
                      TilliLab | MODX Ambassador
                      website