bug or code mistage?

From: Sako! (webobject..tcc.datos.de)
Date: Tue Aug 31 2004 - 08:07:09 EDT

  • Next message: Twan Kogels: "Re: PrefetchHelper bug"

    hello,

    the Fetch is limited to 1

    ----------------------------------------------

    code

        private void readFromQuery(String name)

       {

            DataContext dataContext = .

    SelectQuery storedQuery = (SelectQuery) dataContext.getEntityResolver().lookupQuery("TryQuery");

            Map parameters = new HashMap();

            parameters.put("vorname", name);

            storedQuery = storedQuery.queryWithParameters(parameters);

            List objects = dataContext.performQuery(storedQuery);

            Adressen gallery = (Adressen) objects.get(0);

           }
    ----------------------------------------------

    i thought when i use performQuery ( query with parameters)

    i will get a row with the correct query.

    in line >> parameters.put("vorname", name);

    if name = "asdfskfjsfjlsöafjsalöfsöldfj" // mean a name which doesnt exist. i get the first row in the table

    the same result when i use a wrong parameter name like

    in line >> parameters.put("vornaaaame", name); // in Cayenne the param is $vorname

    thanks

    Sako.



    This archive was generated by hypermail 2.0.0 : Tue Aug 31 2004 - 08:08:11 EDT