Importing an EOModel with single table inheritance

From: Simon (simo..issmarple.co.uk)
Date: Sun Mar 04 2007 - 13:10:04 EST

  • Next message: Peter Schröder: "AW: Java5: the expression of type list needs unchecked conversion"

    Hi -

    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)



    This archive was generated by hypermail 2.0.0 : Sun Mar 04 2007 - 13:11:30 EST