Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-146295

The deletion does not work correctly if an object with scope Company has a relationship OneToMany with another object with scope Site

    Description

     Description

    The deletion does not work correctly if an object with scope Company has a relationship OneToMany with another object with scope Site

     Steps to Reproduce

    1. Go to Control Panel >  Objects
    2. Add a object called CustomUser
      1. Add a field called FirstName (type String)
      2. Set the Title Field to FirstName
      3. Set the Scope to Company
      4. Set the Panel Category Key to Control Panel > Users 
      5. Publish
    3. Add a second object called CustomTicket
    4. Go back to CustomUser 
      1. Add a relationship (one to many) with CustomTicket
      2. Set the Deletion Type to Cascade
    5. Go back to CustomTicket
      1. Set the Scope to Site
      2. Set the Panel Category Key to Content & Data
      3. Publish
    6. Go to Control Panel > Users > CustomUser > Add Entry
      1. Fill the FirstName field and Save
    7. Go to Content & Data > CustomTicket > Add Entry
      1. Fill the relationship field with the only available option and Save
    8. Go to Control Panel > Users > CustomUser
      1. Delete the only existing entry
    9. Go to Content & Data > CustomTicket and Observe

     Expected Result
    The entry is also removed from CustomTicket since the Deletion Type was set to Cascade

     Actual Result
    The entry remains in CustomTicket 

    Obs.: Bug also happens if the Deletion Type is Disassociate or Prevent

     Evidence: bug_evidence.mov

     Reproduced In master: 
    e26c69e21a49adae12612b58b15394ac04557d81

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            paulo.albuquerque Paulo Albuquerque
            Reporter:
            carolina.barbosa Carolina Barbosa
            Participants of an Issue:
            Recent user:
            Felipe Lins
            Engineering Assignee:
            Paulo Albuquerque
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              28 weeks, 5 days ago

                Packages

                Version Package