[ https://issues.apache.org/jira/browse/CAY-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962879#comment-15962879 ]
ASF GitHub Bot commented on CAY-2171: ------------------------------------- GitHub user nismooooooo opened a pull request: https://github.com/apache/cayenne/pull/191 CAY-2171 Modeler: Undo db Entity Sync throws error You can merge this pull request into a Git repository by running: $ git pull https://github.com/nismooooooo/cayenne CAY-2171 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cayenne/pull/191.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #191 ---- commit c6686098399bfb21be8200fa390ebe764f4f99f5 Author: Anton Dreka <drek...@gmail.com> Date: 2017-04-10T13:45:49Z CAY-2171 Modeler: Undo db Entity Sync throws error ---- > Undo db Entity Sync throws error > -------------------------------- > > Key: CAY-2171 > URL: https://issues.apache.org/jira/browse/CAY-2171 > Project: Cayenne > Issue Type: Bug > Components: Modeler > Affects Versions: 4.0.M4 > Reporter: ana benko > Assignee: Nikita Timofeev > > 1. Reverse Engineer db > 2. Remove one DbEntity attribute > 3. Run Migrate db Schema (to Model) and restore attribute > 4. Run Undo > -> CayenneModeler Info > Version: 4.0.M4-SNAPSHOT > Build Date: Dec 06 2016 07:36:54 > Exception: > ================================= > java.lang.IllegalArgumentException: An attempt to override attribute > 'salary_amount' > at org.apache.cayenne.map.Entity.addAttribute(Entity.java:145) > at org.apache.cayenne.map.DbEntity.addAttribute(DbEntity.java:233) > at > org.apache.cayenne.modeler.action.CreateAttributeAction.createDbAttribute(CreateAttributeAction.java:170) > at > org.apache.cayenne.modeler.undo.RemoveAttributeUndoableEdit.undo(RemoveAttributeUndoableEdit.java:121) > at javax.swing.undo.UndoManager.undoTo(Unknown Source) > at javax.swing.undo.UndoManager.undo(Unknown Source) > at > org.apache.cayenne.modeler.undo.CayenneUndoManager.undo(CayenneUndoManager.java:84) > at > org.apache.cayenne.modeler.action.UndoAction.performAction(UndoAction.java:57) > 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$500(Unknown Source) > at java.awt.EventQueue$3.run(Unknown Source) > at java.awt.EventQueue$3.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at > java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown > Source) > at > java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown > Source) > at java.awt.EventQueue$4.run(Unknown Source) > at java.awt.EventQueue$4.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at > java.security.ProtectionDomain$JavaSecurityAccessImpl.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 was sent by Atlassian JIRA (v6.3.15#6346)