This topic outlines current, known limitations and restrictions
for EJB deployment.
EJB mapping limitations and restrictions
- SQL Server mapping problem with FLOAT data type: If your CMP bean has
been mapped to an SQL Server database, then a field of type float needs to
be mapped to a column of type FLOAT, not REAL.
- Support for mapping enterprise beans to foreign keys and primary keys:
When you are mapping an enterprise bean to a database table, there are several
restrictions involving foreign keys and primary keys:
- If the table has multiple foreign keys that contain multiple columns,
the foreign keys cannot overlap each other if both foreign keys are used in
a mapping to two different EJB relationships. For example, if ForeignKey1
contains ColumnA and ColumnB, ForeignKey2 can contain ColumnC and ColumnD,
but cannot contain ColumnB and ColumnC. If ForeignKey2 contains ColumnB and
ColumnC, the two foreign keys would overlap each other.
- If the table has a multi-column primary key and one or more foreign keys
that share those columns, the foreign keys must either contain the exact same
column(s) as the primary key or contain columns entirely outside the primary
key. For example, if PrimaryKey1 contains ColumnA and ColumnB, ForeignKey1
can contain ColumnA and ColumnB or ColumnC and ColumnD, but it cannot contain
ColumnB and ColumnC. In the case of multiple foreign keys, each foreign key
must meet this requirement.
- If you have a foreign key to two different tables, you cannot use the
EJB mapping tools to map more than a single one-to-many (1:M) relationship
from beans to a single foreign key of another bean. The foreign key needs
to be unique to each relationship.
- Inheritance and secondary table mapping: If you are using the root-leaf
approach to mapping inheritance or are using secondary maps with multiple
tables, you should remove the foreign-key constraints from the database to
avoid referential integrity ordering issues (SQL statements executed out of
order).
- Optimistic predicates for 1.1 CMP Entity beans:
In
versions of WebSphere® Studio
Application Developer earlier than V5.0, adding attributes of an EJB 1.1 CMP
entity bean to an optimistic predicate was not supported. However, if you
use the workbench to deploy an EJB application that you developed using a
version earlier than V5.0 and does not include a list of attributes for an
optimistic predicate, all of the available predicates are used. EJB 2.x CMP
entity beans are treated differently. If no attributes are selected as predicates,
then none are added to the overqualified update.
- When mapping EJBs with inheritance, you can use a single table mapping
strategy where all fields from all beans in the hierarchy are mapped to one
table, or a root-leaf strategy where each bean has an unique table to store
attributes unique to that bean. You can also use a mixed strategy where some
beans are stored in its parent table as in single table and other beans are
stored in separate tables as in root-leaf.
If you have a mixed strategy,
you must follow the following rule when using EJB queries: If a bean is mapped
to its parent table, then all of its descendants, siblings and descendants
of its siblings must follow the same strategy. For example, given a hierarchy
illustrated below, if ChA1 is mapped to the same table as ChA, then ChA3,
ChA2 and ChA4 must also be mapped to the same table.

Arabic characters not supported for Java™ files
and enterprise beans
Do not use Arabic characters in names for Java files,
enterprise beans, or access beans.