Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-764

Exception when importing an EOModel with single table inheritance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0 branch
    • 3.0M1
    • Modeler
    • None

    Description

      I'm trying to import an EOModel with cayenne Modeler and i'm getting the exception pasted below. ABSTRACT_FOP is a table that has a super entity and 2 sub entities mapped to it.

      Is it not possible to import an EOModel that has single-table inheritance ?

      Thanks, Simon

      CayenneModeler Info
      Version: 2.0.2
      Build Date: January 14 2007
      Exception:
      =================================
      org.apache.cayenne.CayenneRuntimeException: [v.2.0.2 January 14 2007] One and only one entity should be mapped to ABSTRACT_FOP. Instead found : 3
      at org.apache.cayenne.wocompat.EOModelProcessor.makeFlatRelationships(EOModelProcessor.java:661)
      at org.apache.cayenne.wocompat.EOModelProcessor.loadEOModel(EOModelProcessor.java:171)
      at org.apache.cayenne.wocompat.EOModelProcessor.loadEOModel(EOModelProcessor.java:117)
      at org.apache.cayenne.modeler.action.ImportEOModelAction.importEOModel(ImportEOModelAction.java:125)
      at org.apache.cayenne.modeler.action.ImportEOModelAction.performAction(ImportEOModelAction.java:89)
      at org.apache.cayenne.modeler.util.CayenneAction.actionPerformed(CayenneAction.java:163)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
      at apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:104)
      at java.awt.MenuItem.processActionEvent(MenuItem.java:597)
      at java.awt.MenuItem.processEvent(MenuItem.java:556)
      at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:298)
      at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:286)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:466)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            cayenne_simon Simon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: