Re: Generate Java Classes

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jun 15 2004 - 11:06:04 EDT

  • Next message: Andrus Adamchik: "M7_1 [Was: Cayenne 1.1 M7 Released]"

    On Jun 15, 2004, at 10:22 AM, Friend Friend wrote:
    > 1. As in the Server Side Documentation and in the Modeler guide on the
    > site. I see about "Generate Java Classes " but, I am nbot able to get
    > it created. Is there anything specific I need to follow to get it
    > generated.

    You do not describe what you've actually done and what happened. I
    assume you are generating classes from CayenneModeler, not Ant, right?
    So when you select a DataMap, go to "Tools -> Generate Classes", and
    then click "Generate", what exactly doesn't work in this sequence?

    > 2. As in the Server Side document we need to point it to the table to
    > get the DataMap created. If I am involved with a stored procedure, can
    > I point it to the Stored procedure to get the DataMap. ie., DataMap
    > should enclose the fields(columns) returned in the result set.

    I am not sure I that fully understand from your description where you
    are with that, so let me answer in general.

    At the moment reverse engineering of stored procedures is not
    implemented (only tables), so you'll have to create all the stored
    procedures in the DataMap using the modeler. It is not automated.
    However this will be implemented pretty soon.

    Mapping entities to stored procedures directly is not supported either.
    You'll have to have an underlying table/view for each Java class
    (ObjEntity). However you can *fetch* objects of a given entity with a
    stored procedure as described here:
    http://objectstyle.org/cayenne/userguide/stored-procedures/select.html

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Jun 15 2004 - 11:06:11 EDT