Hi-
I'm a little new at OJB, but I think it's possible. Take a look at the
section on nested objects at
http://db.apache.org/ojb/tutorial3.html#nested%20objects, specifically
the class-descriptor listed in that section.
Your repository.xml should something like
<class-descriptor class="A" table="A">
....
<field-descriptor
name="firstB::string1"
column="firstB_string1"
/>
<field-descriptor
name="firstB::string2"
column="firstB_string2"
/>
<field-descriptor
name="secondB::string1"
column="secondB_string1"
/>
<field-descriptor
name="secondB::string2"
column="secondB_string2"
/>
</class-descriptor>
Hope that helps.
-Nick
On Thu, 2003-11-13 at 08:54, RÃmi Bars wrote:
> Hi all,
>
> in my application i have an association between 2 objects A and B. i want to
> store the items of B in the A table , is it possible? how can i do that
> with the odmg api, how can i map that in the repository?is it a stupid
> question?
>
> Sample :
> class A {
> int id
> B firstB;
> B secondB
> }
> class B {
> string string1;
> string string2;
> }
>
> create table A(id int primary key not null, firstB_string1 varchar(20),
> firstB_string2 varchar(20),secondB_string1 varchar(20),secondB_string2
> varchar(20))
>
> thank
>
> Remi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]