Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-344

Automatically exclude "parent references" from parented collections.

    XMLWordPrintableJSON

Details

    Description

      Suppose we have a bidirectional many:many, eg Customer <>* CustomerAddress *<> Address.

      The CustomerAddress "link" entity has references back to both Customer and Address.

      When viewing the Customer, would like the parented table showing the addresses collection (of CustomerAddress) to show the Address property of the CustomerAddress but not to show the parent Customer property.

      Conversely, when viewing the Address, would like the parented table showing the customers collection (of CustomerAddress) to show the Customer property of the CustomerAddress but not to show the parent Address property.

      In other words, what is shown in the table takes into account the context in which it is shown.

      Proposal to do this is to extend the @Hidden annotation's Where enum:

      public class CustomerAddress {

      @Hidden(where = Where.REFERENCES_PARENT)
      private Customer customer;

      @Hidden(where = Where.REFERENCES_PARENT)
      private Address address;

      ...
      }

      Attachments

        Activity

          People

            danhaywood Daniel Keir Haywood
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: