Querying based on 1/2 the compound key

From: Fredrik Liden (flide..ranslate.com)
Date: Tue May 24 2005 - 19:18:29 EDT

  • Next message: Joshua Pyle: "Re: Querying based on 1/2 the compound key"

    I have one table with a compound key (key1,key2).

    Now I'm trying to retreive all the entries from this table/object TEST
    where say key2="1111".

    If I use an expression like this:
    Expression exp = ExpressionFactory.matchExp(TEST.KEY,"1111");
    SelectQuery query = new SelectQuery(TEST.class,exp);
    I get an exception.

    Using the DataObjectUtils object I could probably get 1 unique object if
    I populate it with a key map.
    But how can I get a list if I just want to match one part of the
    compound key?

    Thanks,

    Fredrik



    This archive was generated by hypermail 2.0.0 : Tue May 24 2005 - 19:16:23 EDT