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

Update FrameworkSynchronizer to avoid the "Object not yet known to Isis" exception

    XMLWordPrintableJSON

Details

    Description

      Sometimes the Isis synchronizer has not yet picked up the domain entity and needs to be created.

      It has been detected when using the @Persistent ("dependentElement="true") JDO annotation, such as in:

      @PersistenceCapable
      @Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
      public class TimeScale extends AbstractScale {

      // {{ TimeScaleLevels (Collection)
      @Persistent(mappedBy = "timeScale", dependentElement = "true")
      private SortedSet<PointInTime> timeScaleLevels = new TreeSet<PointInTime>();

      ...
      }

      The solution is simply to update the ensureRootObject method.
      Replace the "getAdapterManager().getAdapterFor(pojo)" by "getAdapterManager().adapterFor(pojo)" as it will create the adapter if it's still not available to Isis.

      Attachments

        Activity

          People

            oscarbou Óscar Bou
            oscarbou Óscar Bou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: