|
Your select statement in findBy method MUST include
EVERY mapped property of your Entity Bean even if you use partial SQL
statement.
(i.e:"select T_Hotel.hotel_name,T_Hotel.trans_xid from T_Hotel where T_Hotel.trans_xid=$1") After findBy method found each of your entity beans
application server loads the data into memory. That's why it MUST have EVERY
field. Otherwise it would have to do n+1 SQL query to load your bean. 1 select
statement is faster then n+1.
Actually you probably don't even need to use
partial="false" here. The only good use for partial that I found is calling
stored procedures and doing complex joins in findBy
methods.
Boris
|
- CMP-findBy method tasneem
- RE: CMP-findBy method Boris Gertsberg
- RE: CMP-findBy method Jeff Schnitzer
- thanks CMP-findby method worked tasneem
