I have a piece of code like this:
 
            ...
            query.setFetchingDataRows(true);
            List orders= dataContext.performQuery(consulta);
            ...
 
then an Iterator over the orders list where I try to recover a datarow:
 
        while(i.hasNext()){
                Map map = (Map)i.next();
                org.objectstyle.cayenne.CayenneDataObject object = (org.objectstyle.cayenne.CayenneDataObject)dataContext.objectFromDataRow("Order", map);
        }
 
The problem is that always get a ClassCast Exception...I logged the kind of objects inside the list (i.next().getClass().getName()) and I could saw that it was an Order object and not a Map. Must I do something more additionaly  to setFetchingDataRows(true) if I want to get only the rows?...Thx. in advance....
            
 
 
 
---------------------------------
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
This archive was generated by hypermail 2.0.0 : Tue Oct 28 2003 - 12:18:05 EST