Can i map my Entity Bean with more than one table ? Can i map my Entity Bean with View(virtual table) ? because view is also a table.
Arul Prasad
Ranch Hand
Joined: Jan 20, 2005
Posts: 57
posted
0
hi
it is not possible to map the entity bean with more than one table but one table can have may entity bean...
next view is not a pure table it is a virtual table and it is based on the base table select query
so we cant map the entity bean with view
entity bean is one which is the representation of one entity or record in the DB
With Regards<br />Arul
Valentin Tanase
Ranch Hand
Joined: Feb 17, 2005
Posts: 704
posted
0
Hi Kri,
Can i map my Entity Bean with more than one table ?
No accordingly to the specs, yes accordingly to some container vendors. For example WebLogic allow you mapping an EJB component to multiple database tables.
Can i map my Entity Bean with View(virtual table) ? because view is also a table.
Yes you can. However you�ll have an obvious problem trying to update your database, since views are read only. It will work just fine with BMP and it might work very well with CMP if your container provides kind of ReadOnly concurrency strategy out of the box. I remember about some other tricks, when mapping entity EJBs to database views using CMP: creating a database trigger that intercepts all updates and insertions and redirect them to the real tables. Regards.