RE: DataObject tha contain other DataObject

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jan 21 2005 - 10:12:53 EST

  • Next message: Andrus Adamchik: "RE: DataObject tha contain other DataObject"

    You'll have to define Obj/DbEntity pairs for both objects. After that the
    steps are roughly the following:

    1. Create a DbRelationship between Channel DbEntity and another DbEntity
    of a related object (ChannelDetailType). Click on "Database Mapping"
    button in the lower right corner and add a join to the relationship, based
    on provider_id column.

    2. Create an ObjRelationship from Channel ObjEntity to ChannelDetailType
    ObjEntity, and map it to DbRelationship created in step (1)

    Andrus

    > But if i use a stored procedure with cursor in out parameter, this is
    > possible? I have defined a db-entity that doesn't correspond to any db
    > table. I use it only to map that cursor.
    >
    > If my cursor is defined in this way (and mapped to my "Channel"
    > dataobject):
    > TYPE ChannelDetailType IS RECORD(id number,NAME VARCHAR2(255),
    > provider_id NUMBER);
    >
    > where "provider_id" must by remapped to another dataobject, how i can
    > say to cayenne to use this number to retrive "provider" data?
    >
    > I must have a cursor with all the field that compose provider data
    > object?
    > TYPE ChannelDetailType IS RECORD(id number,NAME VARCHAR2(255),
    > provider_id NUMBER, provider_name VARCHAR(255), provider_type
    > VARCHAR(255)...);
    >
    > Thank's
    > Davide



    This archive was generated by hypermail 2.0.0 : Fri Jan 21 2005 - 10:12:55 EST