Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30508

Improve handling of objects passed to moodle_database on insert/update operations

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 2.0, 2.1, 2.2, 2.3
    • Database SQL/XMLDB
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Moderate

      This is one followup of MDL-30480 (where we went back to allow custom objects to be passed). Also this should be consider a "sister" of MDL-29894 and both should be considered, decided and implemented at the same time, surely for 2.3 and without backporting.

      Some comments from the original issue:

      • It is a new feature, since 2.0 we have not supported custom objects there.
      • I'm not sure if the way is to allow them or to debug about them and provide fallback conversion using get_object_vars(). This needs to be decided before implementation. And once decided:
        • It must cover all insert/update operations, xx_raw() ones included.
        • It requires specific unit-tests, both stdclass and object with privates/magics should be tested if we really want support to them.

      Here it is the original commit, that could be a good base - from MDL-30480 - for continuing here):

      https://github.com/stronk7/moodle/compare/master...wip_MDL-30508.objects_on_moodle_database

            skodak Petr Skoda
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.