Ok.
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
-----Original Message-----
From: Andrus Adamchik [mailto:andru..bjectstyle.org]
Sent: venerd́ 21 gennaio 2005 15.43
To: cayenne-use..bjectstyle.org
Subject: Re: DataObject tha contain other DataObject
Cayenne has a concept of relationship that addresses exactly this case - a
to-one or to-many "link" between DataObjects of different entities. This
is supported via the Modeler (see relationship tab for ObjEntity).
ObjRelationships map to DbRelationships of DbEntities, i.e. db PK/FK
joins.
On most databases (except for MySQL) you get the releationships mapped
automatically during reverse-engineering if the database constraints are
defined properly in the schema.
Andrus
> Hi,
> another question:
> is possible to fill a bean (data object) made in this manner:
> ----------------------------------------------------------
> public class MyTypeImpl extends
> org.objectstyle.cayenne.CayenneDataObject {
>
> public String getMySimpleField()
> {
> return (String) readProperty("MySimpleField");
> }
>
> public void setMySimpleField(String mySimpleFieldValue) {
> writeProperty("MySimpleField", mySimpleFieldValue);
> }
>
> //HERE THE PROBLEM
> public MyType2Impl getMyType2Field()
> {
> return (MyType2Impl) readProperty("MyType2Field");
> }
>
> public void setMyType2Impl(MyType2Impl myType2FieldValue) {
> writeProperty("MyType2Field", myType2FieldValue);
> }
>
>
> }
> ----------------------------------------------------------
> where "MyTypeImpl" and "MyType2Impl" are CayenneDataObject.
> How i map this to my datamap xml file?
>
> Thank's
> Davide
This archive was generated by hypermail 2.0.0 : Fri Jan 21 2005 - 10:01:42 EST