Limitations of EJB mapping tools
This topic outlines current known limitations and restrictions for the EJB mapping.
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.
- 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.