Re: orderList() on non-DataObjects?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jan 27 2006 - 15:17:43 EST

  • Next message: Bryan Lewis: "Re: orderList() on non-DataObjects?"

    We switched to Cayenne's own PropertyUtils class for introspection.
    It doesn't support maps at the moment, but it should. Please open an
    improvement request in Jira - it should be pretty easy to add this
    functionality.

    Andrus

    On Jan 27, 2006, at 3:06 PM, Bryan Lewis wrote:

    > With previous releases of Cayenne (1.2M4 and earlier), we were able to
    > call Ordering.orderList(list) even with a list of plain old Maps. We
    > were being a bit lazy but it sure was convenient. It worked even
    > though
    > a Map isn't a JavaBean-compliant object.
    >
    > Now we're upgrading to 1.2M10 and that no longer works. We get
    > this trace:
    >
    > org.objectstyle.cayenne.exp.ExpressionException: [v.1.2-dev
    > January 2 2006]
    > Error evaluating expression 'nic'
    > expressionString: nic
    > unlabeledMessage: Error evaluating expression 'nic'
    > org.objectstyle.cayenne.exp.parser.SimpleNode.evaluate
    > (SimpleNode.java:247)
    > org.objectstyle.cayenne.query.Ordering.compare(Ordering.java:212)
    > java.util.Arrays.mergeSort(Arrays.java:1284)
    > ... 8 of these ...
    > org.objectstyle.cayenne.query.Ordering.orderList(Ordering.java:203)
    >
    >
    > Now, obviously we can write our own code to call Collections.sort()
    > and
    > such things. But first I thought I'd ask if this makes sense with
    > recent
    > changes in Cayenne. I didn't see anything obvious in the release
    > notes.
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Jan 27 2006 - 15:17:49 EST