Uploaded image for project: 'ContentBox Modular CMS'
  1. CONTENTBOX-534

Categories bi-directional relationship has cascade delete effect on related content, not targeted content.

    Details

      Description

      Hi guys,

      we suddenly have a problem that occurred from one day to another.

      We now found out, that it happened when a page is saved. The problem here is, that several pages were saved at the same time.

      So we are adding an existing category to a page. In the ORM log we saw that the categories are detached and attached. Why are they detached? –For me this is making no sense. We have now a lot of content in Contentbox. Saving the pages is taking more and more time, because the delete and add process on the database runs longer…
      Since we have this problem we switched from CF10 to Railo 4.3.
      But anyhow: The ORM log is the same, even on different environments.

      It seems that each save process selects the categories that need to be reattached. But when one process selects the, in a state were the other process already detached a couple of them, they will never be written back completely.

      Is there are a solution for it? It would be the best, just to add the categories that were not attached to the page before.

      contentbox-admin\handlers\pages.cfc:
      ...
      // detach categories and re-attach
      page.setCategories( categories );
      ..

      Andrew suggested to lock the process. But please see Gunnars reply:

      https://groups.google.com/forum/#!topic/contentbox/PaeO2arhOrg

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lmajano Luis Majano
                Reporter:
                akitogo Andreas Weber
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: