Fwd: Re: cayenne-cmd-app

From: Andrus (andru..bjectstyle.org)
Date: Mon Sep 16 2002 - 23:37:54 EDT

  • Next message: Michael Misha Shengaout: "Router for cayenne server is to be reset in 5 minutes"

    Oops , forgot to copy to the list...

    >Date: Mon, 16 Sep 2002 23:37:14 -0400
    >To: Joseph Rajkumar <rajkuma..elocity.com>
    >From: Andrus <andru..bjectstyle.org>
    >Subject: Re: cayenne-cmd-app
    >Hi Joseph,
    >At 12:53 AM 9/16/2002 -0400, you wrote:
    >>Hi Folks
    >> Thanks to the folks on this mailing list, I got the
    >>cayenne-web-app to work fine using MySql. Please
    >>not in this cayennd-web-app if the name of the Painter
    >>is a single string, it works, but "Molly Brown" does not work
    >>cayenne-web-app/addPainting.do?name=Brown == works fine
    >>cayenne-web-app/addPainting.do?name=Molly Brown == does not work.
    >This is really strange. I need to take a look.
    >>Then I started playing around with the cayenne-cmd-app.
    >>I got it work fine as distributed, but when I wanted to add the
    >>date of birth for the artist, I get all kinds of exceptions.
    >>import java.sql.Date;
    >>// create new Artist object
    >> Artist dali = (Artist)ctxt.createAndRegisterNewObject("Artist");
    >> dali.setArtistName("Salvador Dali");
    >> dali.setDateOfBirth(new java.sql.Date((long) 19900225));
    >>Add the above to Main.java and run it, you will get lots of messages.
    >I need to try it to actually confirm my idea, but from the exception
    >message and the code sample you provided, I would guess there is a type
    >mismatch. In tutorial model, artist date of birth is mapped as
    >java.sql.Time (yes, it doesn't make sense for the date of birth, and we
    >need to change it, but it shouldn't cause the crash). You are assigning it
    >a java.sql.Date value. I assume you changed it in the Java class, or
    >otherwise it would not compile?
    >If so, you will need to change the type of this attribute in the data map
    >as well. Changes that need to be done are in ObjEntity and related DbEntity.

    This archive was generated by hypermail 2.0.0 : Mon Sep 16 2002 - 23:37:36 EDT