Thanks, Jonathan...
Does this imply that this ability is not something covered by the 1.1 spec?
Its important for my project that I be able to deploy in any 1.1 compliant
server, so I have to keep what I do to things mandated by the spec.
If its not in the spec, whats the recomended procedure for handling
something like this? You suggested passing the address down, which I agree
is a nices solution, but how would I make it work at deployment time?
Thanks!
Jim
--On Wednesday, May 31, 2000 10:33 AM -0700 "Jonathan K. Weedon"
<[EMAIL PROTECTED]> wrote:
> Jim,
>
> <vendor>
>
> IAS 4 provides the ability to use primary keys as parameters
> to finder method.
>
> Alternatively, you could have the finder method take the
> Address remote references as a parameter:
>
> public Collection findByAddress(Address a) ...;
>
> which seems a little more object-oriented, to me, instead
> of dealing always with primary keys.
>
> See our example:
>
> <ias>/examples/ejb/pigs
>
> for details.
>
> </vendor>
>
> -jkw
>
> Jim Archer wrote:
>>
>> Hi All...
>>
>> I'm wondering if it is possible to have a finder method that accepts as a
>> parameter the primary key object of another EB.
>>
>> For example, I might have a PersonEB entity bean that has a reference to
>> an AddressEB entity bean. The AddressEB would have its own primary key
>> class, AddressPK. The Person bean might have a finder method like this:
>>
>> public Collection findByAddress(AddressPK adr) throws FinderException,
>> RemoteException;
>>
>> Of course, the idea is to use CMP to persist all the Person beans and all
>> the Address beans and to not replicate addresses in the database
>> unnecesserally. Five people with the same address would each have a
>> reference to the same Address bean. This is a contrived example. My
>> actual project will win big doing this type of thing.
>>
>> It seems easy enough to code the method, of course, but how does it get
>> deployed? Is this doable?
>>
>> Thanks!
>>
>> Jim
>>
>> ========================================================================
>> === 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".
===========================================================================
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".