There are a lot of examples out there that illustrate Order and its
LineItems. In these examples, there is a business method defined on Order
remote interface called "getLineItems" which calls the findByOrder method on
the home interface of the LineItem. The findByOrder on the remote interface
returns an enumeration of primary keys. This does not make sense to me.
Why do ejbFinder methods on the home interfaces return enumeration of
primary keys?
Wouldn't it be better to return enumeration of the objects themselves?
If an Order object has 100 Order Line Items, this would resolve to 101
database queries vs 1 database query!
select * from order
vs
select * from order where orderid = 1
...
select * from order where orderid = 100
I understand the method "getLineItems" on the Order object does not have to
call the home interface of the LineItem. Another way would be to do a
select * from order and create all the OrderLineItem objects (instead of
primary keys). But I wonder why this is not done in the countless examples
that I have seen?
Thanks. I appreciate your thoughts.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".