I changed the the finder definition in JAWS.XML to this:
<finder>
<name>findByServiceInstanceParameter</name>
<query>, service_instance_parameter, service_instance where
service_instance_parameter.SERVICE_INSTANCE_PARAMETER_UID = {0} and
service_instance_parameter.SERVICE_INSTANCE_UID =
service_instance.SERVICE_INSTANCE_UID and vendor_uid in (select vendor_uid
from proxy_account, service_instance where
service_instance.PROXY_ACCOUNT_UID=proxy_account.PROXY_ACCOUNT_UID ) and
service_instance_parameter.TYPE_UID =
vendor_si_parameter_choice.SI_PARAMETER_UID and service_instance.TYPE_UID =
vendor_si_parameter_choice.SI_TYPE_UID </query>
<order>CHOICE_UID</order>
</finder>
And it worked! I guess I did not mention that I ran the generated SQL in
TOAD and it said that VENDOR_UID was ambiguous (not the CHOICE_UID).
The generated SQL does NOT put the table name on ALL columns (just the first
one!) that are part of the key:
SELECT
VENDOR_SI_PARAMETER_CHOICE.SI_PARAMETER_UID,SI_TYPE_UID,VENDOR_UID,CHOICE_UI
D FROM VENDOR_SI_PARAMETER_CHOICE ,
service_instance_parameter,service_instance where ..
Note that what I put in JAWS.XML is in mixed case and what the container
generated is in upper case.
I worked around it, so it is a minor bug, but I believe that it is a bug.
Mark
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of danch (Dan
Christopherson)
Sent: Tuesday, June 19, 2001 6:06 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Problem with custom finder on CMP Bean with
complex key
Mark Desrosier wrote:
> I have a CMP Entity Bean defined lke this in JAWS.XML:
> <entity>
> <query>SI_TYPE_UID = {0} and VENDOR_UID = {1} and
> SI_PARAMETER_UID = {2}</query>
All JAWS does is take what you put in here and stick in where the where
clause should be in the SQL. Go ahead and add the tablename prefix right
in there.
> <order>CHOICE_UID</order></finder>
And here as well.
-danch
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user