It's said that many containers only support one-to-one mapping between ejb and database table.I don't know if that is true.
If I want do such query,say,
"select * from tableA,tableB where tableA.id=tableB.id"
"select name from tableA where id in (select id from tableB)"
How can I do?
Since BMP allow user to do his own query,I think it's possible to implement this target
But how about CMP?
In this situation, I generally use a session bean to do the query. If the query is complex, more often than not I'll just use a SQL statement directly, ignoring entity beans. If the query is relatively simple, I may use entity beans within the session bean to help resolve it.