Re: Entity bean with multiple tables?what is primary key?
Tuesday, November 27, 2001 09:06 AM
Entity Beans with multiple tables - you probably need BMP so that you manage persistence yourself and can provide code to access and store data in multiple tables from a single bean. so you need to create an Entity Bean, specify its parameters, the implement ejbLoad(), ejbStore(), ejbRemove()... by making JDBC calls to properly CRUD your Entity Bean. Primary Key would be an identifier that uniquely identifies your Entity Bean. For instance, if Order is your Entity Bean, a unique Order Id would probably be used to access the order. At any rate, you need to have a unique identifier that you can use to find Entity Bean and assemble it from the database.