谢谢板桥.
我只是不清楚如何使用实体BEAN进行多表查询和修改,因为实体BEAN好象是对应一张表设计的.而我的项目里都是用SESSION
BEAN,而且SQL是自动生成的,但有一个问题,比如我想得到一张表的一系列记录,按最直接的做法,应该是(是伪码)
set recordset=stament.executeQuery("select a,b ...from table x where ...)
while(recordset.next())
display the records
wend
如果按对象化的做法,至少在我的项目里是这样:
set list=covert to list("select a,b ..from xxx where ...)
the list now contain a lot primary keys of the records.
for everything in the list{
set record=select a,b ....from xxx where id=primarykey;
display the record
}
前面我只需要查询一次数据库,后面要N次,我觉的这样效率真是低.想使用实体BEAN,又觉得它很不灵活,请教您这方面的经验.谢谢.