Skip Headers

# Relational Mappings and EJB

Previous

Next

Use direct mappings to map the (non-CMR) CMF attributes of a bean.

In EJB CMP projects, the bean class does not define real variables in the class – only abstract getter and setter methods. To map the bean's attributes, you must import `ejb-jar.xml` file into TopLink Workbench (see "Configuring Persistence Type").

You can map entity bean attributes using direct mappings without any special considerations.

Note: When you work with EJB, do not map the `entity context` attribute (type `javax.ejb.EntityContext`).

There are some special considerations when using one-to-one mappings (see "One-to-One Mappings and EJB"), one-to-many mappings (see "One-to-Many Mappings and EJB"), and many-to-many mappings (see "Many-to-Many Mappings and EJB").