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 ABOU LINA <am...@gmail.com> on 2006/03/07 20:23:10 UTC

NESTED OBJECT 1:n is possible ???

How can i use nested object in case of 1:n ?? it s possible in OJB

Re: NESTED OBJECT 1:n is possible ???

Posted by Armin Waibel <ar...@apache.org>.
Hi,

ABOU LINA wrote:
> So first thank a lot for your helpful reply ,
> 
> example :
> 
> Class A {
> 
> long id;
> B bObject;
> 
> }
> 
> Class B {
> 
> String name
> String phone;
> }
> 
> In TABLE A :
> -----------------------------------
> BIGINT   id;
> STRING name;
> STRING phone;
> 
> 
> in this case we can use nested object in order to encapsulate  field name
> and phone from table A in Class B. ok .
> 
> 
> but in case of  1:n :
> -------------------------------
> 
> Class A {
> 
> long id;
> Collection  bObjects;  [Collection of B].
> 
> }
> 
> so my question is possible to use nested objects , if yes how can i use it
> ????
> 

No, because "nested objects" and a 1:n reference are completely 
different concepts. In the first case a "nested object" is used to group 
data of one table. In the second case you have two different tables A 
and B with a 1:n reference between A and B.

regards,
Armin

> 
> thank in advance.
> 
> 
> 
> 
> On 3/8/06, Armin Waibel <ar...@apache.org> wrote:
>> ABOU LINA wrote:
>>> How can i use nested object in case of 1:n ?? it s possible in OJB
>>>
>> Sorry, I don't understand your question. In OJB nested objects can be
>> used "group" and encapsulate fields of persistent objects.
>>
>> http://db.apache.org/ojb/docu/guides/advanced-technique.html#Nested+Objects
>>
>> Could you describe more detailed what you mean.
>>
>> regards,
>> Armin
>>
>> ---------------------------------------------------------------------
>> 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


Re: NESTED OBJECT 1:n is possible ???

Posted by ABOU LINA <am...@gmail.com>.
So first thank a lot for your helpful reply ,

example :

Class A {

long id;
B bObject;

}

Class B {

String name
String phone;
}

In TABLE A :
-----------------------------------
BIGINT   id;
STRING name;
STRING phone;


in this case we can use nested object in order to encapsulate  field name
and phone from table A in Class B. ok .


but in case of  1:n :
-------------------------------

Class A {

long id;
Collection  bObjects;  [Collection of B].

}

so my question is possible to use nested objects , if yes how can i use it
????


thank in advance.




On 3/8/06, Armin Waibel <ar...@apache.org> wrote:
>
> ABOU LINA wrote:
> > How can i use nested object in case of 1:n ?? it s possible in OJB
> >
>
> Sorry, I don't understand your question. In OJB nested objects can be
> used "group" and encapsulate fields of persistent objects.
>
> http://db.apache.org/ojb/docu/guides/advanced-technique.html#Nested+Objects
>
> Could you describe more detailed what you mean.
>
> regards,
> Armin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: NESTED OBJECT 1:n is possible ???

Posted by Armin Waibel <ar...@apache.org>.
ABOU LINA wrote:
> How can i use nested object in case of 1:n ?? it s possible in OJB
> 

Sorry, I don't understand your question. In OJB nested objects can be 
used "group" and encapsulate fields of persistent objects.
http://db.apache.org/ojb/docu/guides/advanced-technique.html#Nested+Objects

Could you describe more detailed what you mean.

regards,
Armin

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org