java.util.Set in finder is giving error.. - Weblogic
This is a discussion on java.util.Set in finder is giving error.. - Weblogic ; Hi I have 2 beans...ORDER and Subscription..
and when I write the following finder a finder query..
SELECT OBJECT(a) FROM OrderBean AS a, SubscriptionBean AS b WHERE a.id = b.orderID
AND b.san = ?1
and the return type of this ...
-
java.util.Set in finder is giving error..
Hi I have 2 beans...ORDER and Subscription..
and when I write the following finder a finder query..
SELECT OBJECT(a) FROM OrderBean AS a, SubscriptionBean AS b WHERE a.id = b.orderID
AND b.san = ?1
and the return type of this finder method is Set (java.util.Set).
When I compile Weblogic complains java.util.set is not supported.
Here I dont have CMR relations between..two table..
Now If I put DISTINCT it is giving compilation error Invalid data Type..
SELECT DISTINCT OBJECT(a) FROM OrderBean AS a, SubscriptionBean AS b WHERE a.id
= b.orderID AND b.san = ?1
Is there any restriction over the usage of java.util.set or DISTINCT
-
Re: java.util.Set in finder is giving error..
In CMP 2.0 java.util.Collection is the only collection type supported for multi-entity
finder methods. EJB 1.1 CMP and EJB 2.0 BMP also supports java.util.Enumeration.
thanks,
Deepak
"Perianayagam.T" wrote:
>
>Hi I have 2 beans...ORDER and Subscription..
>and when I write the following finder a finder query..
>
>
>SELECT OBJECT(a) FROM OrderBean AS a, SubscriptionBean AS b WHERE a.id
>= b.orderID
>AND b.san = ?1
>
>and the return type of this finder method is Set (java.util.Set).
>When I compile Weblogic complains java.util.set is not supported.
> Here I dont have CMR relations between..two table..
>
>Now If I put DISTINCT it is giving compilation error Invalid data Type..
>
>SELECT DISTINCT OBJECT(a) FROM OrderBean AS a, SubscriptionBean AS b
>WHERE a.id
>= b.orderID AND b.san = ?1
>
>Is there any restriction over the usage of java.util.set or DISTINCT
>
-
Re: java.util.Set in finder is giving error..
Thanks but y DISTINCT is also not working..
"Deepak Vohra" wrote:
>
>In CMP 2.0 java.util.Collection is the only collection type supported
>for multi-entity
>finder methods. EJB 1.1 CMP and EJB 2.0 BMP also supports java.util.Enumeration.
>
>thanks,
>Deepak
>
>
>
>
>"Perianayagam.T" wrote:
>>
>>Hi I have 2 beans...ORDER and Subscription..
>>and when I write the following finder a finder query..
>>
>>
>>SELECT OBJECT(a) FROM OrderBean AS a, SubscriptionBean AS b WHERE a.id
>>= b.orderID
>>AND b.san = ?1
>>
>>and the return type of this finder method is Set (java.util.Set).
>>When I compile Weblogic complains java.util.set is not supported.
>> Here I dont have CMR relations between..two table..
>>
>>Now If I put DISTINCT it is giving compilation error Invalid data Type..
>>
>>SELECT DISTINCT OBJECT(a) FROM OrderBean AS a, SubscriptionBean AS b
>>WHERE a.id
>>= b.orderID AND b.san = ?1
>>
>>Is there any restriction over the usage of java.util.set or DISTINCT
>>
>