[
https://issues.apache.org/jira/browse/CAY-1708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrus Adamchik closed CAY-1708.
--------------------------------
Resolution: Fixed
Fix Version/s: 3.2M1
Ilya, thanks for the patch. Also good catch on obsolete checking of the query
root on paste. This had some (dubious?) merit prior to 3.1, but with new
projects always made of a single DataDomain (and hence a single entity
namespace), this checking was redundant.
> Modeler error when pasting datamap with EJBQL querry
> ----------------------------------------------------
>
> Key: CAY-1708
> URL: https://issues.apache.org/jira/browse/CAY-1708
> Project: Cayenne
> Issue Type: Bug
> Affects Versions: 3.1B1
> Reporter: George Filipovich
> Priority: Minor
> Fix For: 3.1B2, 3.2M1
>
> Attachments: CAY-1708-last.patch, CAY-1708.patch
>
>
> When copy/pasting datamap that has EJBQL querry in it, modeler throws java
> exception:
> CayenneModeler Info
> Version: 3.1M4-SNAPSHOT
> Build Date: May 15 2012 10:56:20
> Exception:
> =================================
> java.lang.ClassCastException: org.apache.cayenne.query.EJBQLQuery cannot be
> cast to org.apache.cayenne.query.AbstractQuery
> at
> org.apache.cayenne.modeler.action.PasteAction.paste(PasteAction.java:223)
> at
> org.apache.cayenne.modeler.action.PasteAction.paste(PasteAction.java:144)
> at
> org.apache.cayenne.modeler.action.PasteAction.performAction(PasteAction.java:124)
> at
> org.apache.cayenne.modeler.util.CayenneAction.actionPerformed(CayenneAction.java:162)
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> at javax.swing.AbstractButton.doClick(Unknown Source)
> at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
> at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
> Source)
> at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
> at java.awt.Component.processMouseEvent(Unknown Source)
> at javax.swing.JComponent.processMouseEvent(Unknown Source)
> at java.awt.Component.processEvent(Unknown Source)
> at java.awt.Container.processEvent(Unknown Source)
> at java.awt.Component.dispatchEventImpl(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Window.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
> at java.awt.EventQueue.access$000(Unknown Source)
> at java.awt.EventQueue$1.run(Unknown Source)
> at java.awt.EventQueue$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
> Source)
> at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
> Source)
> at java.awt.EventQueue$2.run(Unknown Source)
> at java.awt.EventQueue$2.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
> Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira