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

[Metamodel] Allow for Types that subclass an Entity Type to actually be a Viewmodel.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Resolved
    • None
    • 2.0.0-RC3
    • Core
    • None

    Description

      For an entity relation where the looked up entity does not exist, there are 3 possible ways to handle this:
      (1) fail
      (2) consider the looked up entity as not strictly required to be resolvable and render a (none) badge
      (3) render a pseudo entity, that has the information, which primary or secondary lookup key could not be resolved and perhaps render in a different/warning color say

      Re (3) such a pseudo entity needs to be bookmarkable, hence would be appropriate to implement as viewmodel.

      class MyEntityNotFound extends MyEntity implements ViewModel {
          public MyEntityNotFound (final String memento) { setName(memento); }
          @Override public String viewModelMemento() { return getName(); }
      }
      

      Attachments

        Activity

          People

            hobrom Andi Huber
            hobrom Andi Huber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: