Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is it possible to specify object-relational mappings between EJBs?

0
Posted

Is it possible to specify object-relational mappings between EJBs?

0

Yes it is possible to specify object-relational mappings between EJBs. This can be done in two ways. 1. The OC4J EJB container implements the O-R mapping feature as prescribed in the draft EJB 2.0 specification. Since the specification is not yet finalized, this feature may change as specified in the final version of the EJB 2.0 specification. 2. The EJB container also implements an O-R mapping that is not dependant on the EJB 2.0 specification. To use this perform the following steps. Declare a normal attribute for the “one” side of the relationship, but give it a type of Set, Collection, or whatever the appropriate type is. For example: public Set children; public Set getChildren() { return children; } public void setChildren(Set children) { this.children=children; } Then, declare one more variable: public static final Class children_type=com.es.ejb.Child.class; On deployment, a linking table will be created for you. Even better, you have to write nothing to make use of it; you just

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.