Gotchas
The following is a quick checklist of “gotchas” to help you with your implementation:
If the primary key is composite, a custom primary key class must be defined. The fields of this class must be public and must correspond in name and type to cmp-fields of the bean class.
cmp-field and cmr-field fields must begin with a lowercase letter, (so that it can be capitalized in the corresponding getter and setter method names).
If a collection is returned from a cmr-field's getter method, it must not be modified other than through Iterator.remove() (see EJB specification, section 10.3.6.1).
Collections returned by getter methods cannot be used outside of the transaction context in which they were materialized.
If a bean has no relationships, the ...
Get Sams Teach Yourself J2EE™ in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.