Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-406

Protection against related record deletion in grids

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.0.2-B1
    • Fix Version/s: None
    • Component/s: Unit Configs
    • Labels:
      None

      Description

      There are two type of database record relations in In-Portal:

      • direct - related record is subitem of main record (relation is defined in unit config);
      • indirect - there is dropdown in one table, where you can select data from other table (no direct relation defined on unit config level).

      When main record is deleted, then subitems are deleted as well, so it's not a problem (this is direct relation). For indirect relation this creates a problem.
      I propose to define field relations with other tables in unit config. Such relation will be used to check for related data before actual database record is deleted. This feature will preserve data integrity.

      Here is proposed data format (in main unit config, which shows data from other unit configs):
      'DependentFields' => Array (
      'MainFieldA' => 'related-prefixA_FieldNameA',
      'MainFieldB' => 'related-prefixB_FieldNameB',
      );

      For example you can delete payment type, that is used in orders.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                alex Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: