Hi, Would anybody please tell me, whether I can use CMP Entity bean to refer multiple fields in more than one table. For example, I have a UserEJB which will refer to a table named USER_PROFILE, USER_ADDRESS, ACCOUNT_INFO and ORDER_TABLE. I want to make those fields under the UserEJB and keep persisted by the Container. Can I do so? THX a LOT
Yes, a single EJB may represent multiple tables, however it can be more difficult to create and deploy these EJB's. In particular if you are using 3rd party DB mapping tools to create your EJB definitions, alot of these do not support multiple table beans meaning you have to understand alot more about using the xml deployment descriptors and EJB mapping
The Eagle sneers at the Peacock<p>Systems Administrator<br />OrderWare Solutions Ltd<br /><a href="http://www.orderware.net" target="_blank" rel="nofollow">http://www.orderware.net</a>
So Does it mean it is better to have a view of those tables instead of using the Entity Bean to create such a relationship among those tables. As I am so confused, from some posts many recommend we should make entity bean as a coast grain instead of a fine grained one and also they will say this is a bad practice to have an entity bean for a single table. So it implies me that I should do the entity bean to include all the tables related to the entity logic. But now that it is said that it is hard to do so... I would think that having a view of those will be suitable. Am I correct?
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
a bit of art, as a gift, the permaculture playing cards