Hi,
Do you want EJB to represent master details in the db ?
You need to hand code it into the bean. There is not tool
today that can let you do this on your own.
There are several ways you can do this. One simple approach
that I normally use is as follows:
Let us say you have an orderBean and an orderItemsBean.
In the orderBean you could have an enumeration as a private
variable. Include a public business method called "getDetails".
This method would return the enumeration. Before returning
the enumeration, check if it is null. If it is not null, then
you could lookup and query the details bean using a
"findByMasterData" method. This should give you an enumeration
which can then be assigned to your local enumeration and then
that be returned. So whenever your client makes a getDetails
call on your orderBean, it will also get your details bean.
By doing so you have one inherent problem. If your database
values have changed after you have made the call, then they
will not be reflected in your client.
If you want to do this too, then if the server you are using
will execute your implementation of the find method[most dont],
you could findByMasterData with each of the find methods in the
orderBean.
Please give me any suggestions that you have on this area.
Thanks
RS
On Sat, 31 Jul 1999 11:28:41 -0700, Marian Corcoran <[EMAIL PROTECTED]> wrote:
>Can anyone point me in the direction of any materials which
>discuss how EJB could be used to represent a hierarchical DB,
>with each of the EntityBeans being used to represent different tiers?
>
>Thanks
>
> ==========================================================================
>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".