Hi Philip,
in instances such as this where you require lists of Entities, it is
generally much more efficient to provide a Session Bean which access the
database directly and looks up the primary keys of the entities along with
some type of description to display in a list. This way when a user selects
a specific entity you can perform a findByPrimaryKey on just that entity
without having to load all possible entities in the system.
regards
Duncan Alexander
> -----Original Message-----
> From: Rhodes, Phillip C. [SMTP:[EMAIL PROTECTED]]
> Sent: 20 September 2000 00:10
> To: [EMAIL PROTECTED]
> Subject: [EJB-INT] Lookup price for each product design question?
>
> struggling with this question...thanks.
>
> Currently, I have 2 cmp entity beans 1)Price 2)Product
>
> The product can have several prices associated to it (based upon date
> range
> and who is the customer).
>
> I need to display a list of products. Each product would have it's
> associated price displayed. In my current implementation, as I loop
> through
> my product enumeration I do a price lookup for each product. My question
> is
> that is this horribly inefficient? A no-no?
>
> Please let me know if it is a no-no or if it is okay.
>
> Another approach would be to create another Entity Bean called
> ProductPrice
> which would represent the join between the two objects. Looking for
> recommendations
>
>
> Thanks.
> Phillip
>
>
>
>
> Phillip Rhodes
> [EMAIL PROTECTED]
> Alcoa eCommerce
> https://www.ALCOADIRECT.COM
> 826B Two Allegheny Center Pittsburgh, PA 15212
> (412) 553-4900 (phone) (412) 553-2484 (fax)
>
> ==========================================================================
> =
> 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".
===========================================================================
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".