>From the EJB 2.1 spec, 10.5.7:
'An ejbSelect<METHOD> is not based on the identity of the entity bean
instance on which it is invoked. However, the Bean Provider can use the
primary key of an entity bean as an argument to an ejbSelect<METHOD> to
define a query that is logically scoped to a particular entity bean
instance.'
So, for the finder you could do the same thing.
----
Peter Verkest
Hans Schippers <[EMAIL PROTECTED]>@JAVA.SUN.COM> on 17/03/2003 14:00:56
Please respond to Hans Schippers <[EMAIL PROTECTED]>
Sent by: A mailing list for Enterprise JavaBeans development
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: Re: select methods: special case?
Hi,
I guess I could do that indeed, but I was just curious as to whether it
is possible to focus on just one instance with ejbSelect, and how...
Thanks,
Hans
On Mon, 2003-03-17 at 13:57, Peter Verkest wrote:
> Hans,
>
>
> I think you could do this with an ejbSelect indeed, but why don't you
write
> your finder on the home of B?
>
>
>
> ----
>
> Peter Verkest
>
>
>
>
>
>
>
>
>
> Hans Schippers <[EMAIL PROTECTED]>@JAVA.SUN.COM> on 16/03/2003 11:37:01
> Please respond to Hans Schippers <[EMAIL PROTECTED]>
>
> Sent by: A mailing list for Enterprise JavaBeans development
> <[EMAIL PROTECTED]>
>
> To: [EMAIL PROTECTED]
>
> cc:
>
>
>
> Subject: select methods: special case?
>
>
>
>
>
> Hi,
>
>
> Suppose I have a many-to-many CMR between EJB's A and B.
>
>
> Suppose I have an instance a of A's Local Interface.
>
>
> Suppose I need some B's associated with a (through a.getB()), but not
> all of them, only those of which some field equals some string.
>
>
> What's the best way to do this?
>
>
> Is it possible to write an ejbSelect method for this?
>
>
> I guess finders are impossible, since they can only return A's
> Interfaces, not B's, and they are defined on the home interface, so I
> don't see how they could search in one particular instance of A.
>
>
> Any ideas?
>
>
> Thanks,
>
>
> Hans
>
>
> --
> In a world without walls and fences, who needs windows and gates?
>
>
> Is the essence that the light pulse lives longer?
>
>
> Hans Schippers
> 1LIC INF
> UIA 2002-2003
>
>
>
===========================================================================
> 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".
===========================================================================
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".