Ooops, I really meant to respond to Robert with my previous posting. Sorry
Rickard :-) I agree with your proposal...
Imre
-----Original Message-----
From: Rickard �berg <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, August 27, 1999 12:57 AM
Subject: Re: design question with entity beans
>Hey
>
>Robert Krueger wrote:
>> suppose I have to model an entity (say Order), that aggregates a vector
>> of other entities (say instances of OrderEntry) and I would like to
>> avoid the performance problem of reloading/storing all the aggregated
>> entities (because there possibly is a large number of them) on each
>> access to methods of entity bean class Order. would it be ok to put
>> methods that access the db directly (like addOrderEntry,
>> getOrderEntries) into the entity bean Order and not model OrderEntry as
>> an entity bean? does this violate the spec or is it bad design and there
>> are much better patterns for modeling the problem without performance
>> problems? are there data integrity problems with this approach?
>
>What Chris and Vlada talked about are possible solutions.
>
>An Other Solution is to make the OrderEntry an EntityBean and include
>the following method in Order:
>public Enumeration getEntries()
>{
> // Find from OrderEntry home!
> return oeHome.findByOrder(this.id);
>}
>
>I.e. do it "lazily", but keep the interface simple.
>
>/Rickard
>
>--
>Rickard �berg
>
>@home: +46 13 177937
>Email: [EMAIL PROTECTED]
>Homepage: http://www-und.ida.liu.se/~ricob684
>
>===========================================================================
>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".