J2EE.EJB.container-managed-relations: Are they necessary?
Posted on 2004-07-30
I'm creating several entity beans that use CMP to access a MySQL database. I've already added constraints to the tables in the database using SQL commands. However, I read that the constraining relationships between entity beans (one-to-one, one-to-many, etc.) can also be specified in the deployment descriptors (xml files). If I were to make use of these container-manged-relations, would it still be necessary to use foreign key constraints in the database? If I choose to leave all of the constraints in the database, is there a reason to specify contain-managed-relations?