Short answer, yes, you can pass a CayenneDataObject (subclass) as a
query parameter. There's not enough information there for me (at least)
to tell what the issue might be.
-----Original Message-----
From: Gili [mailto:cowwo..bs.darktech.org]
Sent: Tuesday, September 06, 2005 1:19 PM
To: cayenne-use..bjectstyle.org
Subject: SelectQuery with object parameter
Hi,
I have a SelectQuery with a root of "DefaultImage", and
qualifier of
"theme = $theme". In my Java code I bind "theme" to a DefaultTheme,
which is a DataObject. Then when I try issueing the query I get this
exception:
java.sql.SQLException: Cannot convert class
desktopbeautifier.server.cayenne.DefaultTheme to SQL type requested due
to java.lang.ClassCastException -
desktopbeautifier.server.cayenne.DefaultTheme
The closest discussion I could find is
http://www.objectstyle.org/cayenne/lists/cayenne-user/2002/09/0009.html
but it doesn't look like anyone ever answered it. Am I doing something
wrong? Shouldn't I be able to pass a DataObject as a query parameter?
Thank you,
Gili
-- http://www.desktopbeautifier.com/
This archive was generated by hypermail 2.0.0 : Tue Sep 06 2005 - 13:22:11 EDT