Hi Ramiro!
[EMAIL PROTECTED] writes:
> While testing JBoss we noticed that when building relationships
> among Entity Beans, these don't get actually related, instead we
> get "blobs" for references to the other object.
Theres a patch to avoid having blobs (called nested fields).
Here is a brief description:
Assuming having a EJB called Person with AdressData:
public class Person ... {
public int personID;
public AdressData data;
....
}
public class AdressData implements java.io.Serializable {
public String street;
public String telNo;
...
}
Declaration in ejb-jar.xml
<entity>
<ejb-name>Person</ejb-name>
...
<cmp-field>
<field-name>personID</field-name>
</cmp-field>
<cmp-field>
<field-name>data</field-name>
</cmp-field>
...
</entity>
Declaration of nested fields giving detailed description of
data-object in jaws.xml
<entity>
<ejb-name>Person</ejb-name>
...
<cmp-field>
<field-name>data.street</field-name>
</cmp-field>
<cmp-field>
<field-name>data.telNo</field-name>
</cmp-field>
...
</entity>
This is the key to have no blobs in dbase. Works fine for us.
To have finders automatically created out of cmp-fields there is a
patch @ sourceforge.net which has not been included in jboss ( I think
) so far.
I am working on some docs to describe the use of nested fields in
detail. Hope to get it ready soon. :)
Hope that helps!
--
Torben J�ger
Orientation in Objects GmbH
http://www.oio.de
<< life is short - code hard >>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user