Andrus Adamchik created CAY-3003:
------------------------------------
Summary: Modeler: NPE editing unmapped ObjAttribute
Key: CAY-3003
URL: https://issues.apache.org/jira/browse/CAY-3003
Project: Cayenne
Issue Type: Bug
Reporter: Andrus Adamchik
Assignee: Andrus Adamchik
Fix For: 5.0-M4
An attempt to enter custom class name for an ObjAttribute in the modeler when
it has no DbAttribute mapping throws this:
{noformat}
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot
invoke "org.apache.cayenne.exp.path.CayennePath.value()" because the return
value of "org.apache.cayenne.map.ObjAttribute.getDbAttributePath()" is null
at
org.apache.cayenne.modeler.ui.project.editor.objentity.properties.ObjAttributeTableModel.setObjAttributeType(ObjAttributeTableModel.java:237)
at
org.apache.cayenne.modeler.ui.project.editor.objentity.properties.ObjAttributeTableModel.setUpdatedValueAt(ObjAttributeTableModel.java:308)
at
org.apache.cayenne.modeler.toolkit.table.CMTableModel.setValueAt(CMTableModel.java:62)
at java.desktop/javax.swing.JTable.setValueAt(JTable.java:2810)
at java.desktop/javax.swing.JTable.editingStopped(JTable.java:4809)
at
java.desktop/javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:152)
at
org.apache.cayenne.modeler.toolkit.combobox.CMComboBoxCellEditor.stopCellEditing(CMComboBoxCellEditor.java:69)
at
org.apache.cayenne.modeler.toolkit.combobox.CMAutoCompleteComboBoxCellEditor.stopCellEditing(CMAutoCompleteComboBoxCellEditor.java:50)
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)