You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Ziv Yankowitz <zi...@traiana.com> on 2004/03/02 13:38:22 UTC
Ojb Constructor.
Folks,
We are using The factory-class and factory-method to create a class instance.
however when we use reference descriptor to persist this class it ignores the factory-class and method.
can anyone please help?
here is our ClassDiscriptor:
<class-descriptor
class="A"
table="A"
isolation="serializable"
factory-class="AFactory"
factory-method="create">
<field-descriptor
name="id"
column="ID"
jdbc-type="BIGINT"
primarykey="true"
autoincrement="true"
/>
<field-descriptor
name="type"
column="TYPE"
jdbc-type="INTEGER"
/>
</class-descriptor>
<class-descriptor
class="B"
table="B"
isolation="serializable"
>
<field-descriptor
name="id"
column="ID"
jdbc-type="BIGINT"
primarykey="true"
/>
<field-descriptor
name="longDescription"
column="LONG_DESCRIPTION"
jdbc-type="VARCHAR"
/>
<reference-descriptor name="super"
class-ref="A"
<foreignkey field-ref="id"/>
</reference-descriptor>
</class-descriptor>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Ojb Constructor.
Posted by Thomas Mahler <th...@web.de>.
The factory should be delatred for class B too
Ziv Yankowitz wrote:
> Folks,
>
> We are using The factory-class and factory-method to create a class instance.
> however when we use reference descriptor to persist this class it ignores the factory-class and method.
>
> can anyone please help?
>
> here is our ClassDiscriptor:
>
> <class-descriptor
> class="A"
> table="A"
> isolation="serializable"
> factory-class="AFactory"
> factory-method="create">
> <field-descriptor
> name="id"
> column="ID"
> jdbc-type="BIGINT"
> primarykey="true"
> autoincrement="true"
> />
> <field-descriptor
> name="type"
> column="TYPE"
> jdbc-type="INTEGER"
> />
> </class-descriptor>
>
> <class-descriptor
> class="B"
> table="B"
> isolation="serializable"
> >
> <field-descriptor
> name="id"
> column="ID"
> jdbc-type="BIGINT"
> primarykey="true"
> />
>
> <field-descriptor
> name="longDescription"
> column="LONG_DESCRIPTION"
> jdbc-type="VARCHAR"
> />
> <reference-descriptor name="super"
> class-ref="A"
> <foreignkey field-ref="id"/>
> </reference-descriptor>
> </class-descriptor>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org