Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-108
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CAY-108
Summary: Deleting a related object can throw a ClassCastException
Type: Bug
Status: Assigned
Priority: Major
Project: Cayenne
Components:
Cayenne Core Library
Versions:
1.1 [DEV]
Assignee: Andrus Adamchik
Reporter: Terry Wilcox
Created: Mon, 22 Mar 2004 2:39 PM
Updated: Mon, 22 Mar 2004 2:39 PM
Environment: Cayenne 1.1M4
Description:
org.objectstyle.cayenne.access.util.DefaultSorter.java the method sortObjectsForEntity contains
DataObject[] masters = new DataObject[objRelNames.length];
and later
masters[k] = (objRelName != null
? (DataObject) current.readPropertyDirectly(objRelName)
: null);
This leads to a ClassCastException when the relationship has not yet been resolved and readPropertyDirectly returns a Fault. I'm getting this error with our deletes.
Is there any reason not to declare masters as Object[] and skip the class cast?
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Mon Mar 22 2004 - 14:40:08 EST