Cayenne
  1. Cayenne
  2. CAY-118

EOModel import errors when importing certain types of schemas

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 [LEGACY], 1.1 [LEGACY]
    • Fix Version/s: 1.0 [LEGACY], 1.1 [LEGACY]
    • Component/s: Core Library
    • Labels:
      None
    • Environment:
      EOModel, WO 5.2.3

      Description

      A few errors, all related to creating a "synthetic" reverse DbRelationship:

      1. When creating a reverse reflexive relationship (relationship to itself), the following exception is thrown:

      java.util.ConcurrentModificationException
      at java.util.TreeMap$EntryIterator.nextEntry(TreeMap.java:1026)
      at java.util.TreeMap$EntryIterator.next(TreeMap.java:1033)
      at org.apache.commons.collections.FastTreeMap$CollectionView$CollectionViewIterator.next(FastTreeMap.java:791)
      at java.util.Collections$3.next(Collections.java:1328)
      at org.objectstyle.cayenne.wocompat.EOModelProcessor.makeReverseDbRelationships(EOModelProcessor.java:435)
      at org.objectstyle.cayenne.wocompat.EOModelProcessor.loadEOModel(EOModelProcessor.java:141)
      at org.objectstyle.cayenne.wocompat.EOModelProcessor.loadEOModel(EOModelProcessor.java:92)
      at org.objectstyle.cayenne.modeler.action.ImportEOModelAction.importEOModel(ImportEOModelAction.java:127)
      at org.objectstyle.cayenne.modeler.action.ImportEOModelAction.performAction(ImportEOModelAction.java:104)
      at org.objectstyle.cayenne.modeler.action.CayenneAction.actionPerformed(CayenneAction.java:184)

      2. When there are more then one one-way incoming relationship for a given entity:

      java.lang.IllegalArgumentException: Attempt to insert duplicate key. [key 'toVirtualKioskTypeReverse', parent 'VirtualKioskType', child 'toVirtualKioskTypeReverse']
      at org.objectstyle.cayenne.util.CayenneMap.put(CayenneMap.java:146)
      at org.objectstyle.cayenne.map.Entity.addRelationship(Entity.java:207)
      at org.objectstyle.cayenne.wocompat.EOModelProcessor.makeReverseDbRelationships(EOModelProcessor.java:460)
      at org.objectstyle.cayenne.wocompat.EOModelProcessor.loadEOModel(EOModelProcessor.java:141)
      at org.objectstyle.cayenne.wocompat.EOModelProcessor.loadEOModel(EOModelProcessor.java:92)
      at org.objectstyle.cayenne.modeler.action.ImportEOModelAction.importEOModel(ImportEOModelAction.java:127)
      at org.objectstyle.cayenne.modeler.action.ImportEOModelAction.performAction(ImportEOModelAction.java:104)
      at org.objectstyle.cayenne.modeler.action.CayenneAction.actionPerformed(CayenneAction.java:184)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development