Re: Help to query!!

From: Mike Kienenberger (mkienen..laska.net)
Date: Tue Aug 03 2004 - 15:29:09 EDT

  • Next message: Reinaldo Coelho Sartorelli: "Re: Help to query!!"

    Reinaldo Coelho Sartorelli <reinaldo_sartorell..ahoo.com.br> wrote:
    > Hi people, i have a code down, but this generate a error :
    >
    > Erro: [v.1.1M7_1 June 15 2004] Error creating object for entity 'Generos'.
    >
    >
    >
    > public List ListGenero(String Name){
    > try{
    > //Class Generos(have a description attribute)
    > SelectQuery query = new SelectQuery(this.getClass());
    > List list = conexao.performQuery(query);
    > System.out.println("OK");
    > return list;
    > }
    > catch(Exception e){
    > System.out.println("Error: " + e.getMessage());
    > return null;
    > }
    > }

    I don't see anything immediately wrong.

    What is this.getClass() -- What is the class this method is in? Is "this" a
    subclass of CayenneDataObject?

    Output e.printStackTrace() and post that instead of e.getMessage();



    This archive was generated by hypermail 2.0.0 : Tue Aug 03 2004 - 15:28:37 EDT