-
1. Re: EJBQL Compile error...bug?
kbutler Jul 3, 2003 10:49 AM (in response to kbutler)I changed the name of my schema and got the same error. Also I could not find the original post I had seen; and I didn't find anything relevent on SourceForge bug db.
I did see a note from Dain S. in the bug db about case-sensitivity - he said that keywords and identification variables are case-insensitive - everything else is sensitive. I have to check the spec to see exactly what he means by the latter.
Here's my query DD as generated by XDoclet:
<query-method>
<method-name>findByBuilderIDAndSectionTypeID</method-name>
<method-params>
<method-param>int</method-param>
<method-param>int</method-param>
</method-params>
</query-method>
<jboss-ql><![CDATA[SELECT OBJECT(b) FROM TBB b WHERE b.BuilderID = ?1 AND b.SectionTypeID = ?2]]></jboss-ql> -
2. Re: EJBQL Compile error...bug?
kbutler Jul 3, 2003 1:40 PM (in response to kbutler)OK...NEWBIE ERROR!! We knew that already.
Here's the deal, this may help somebody:
I did not truly understand/believe that the EJB-QL really relates purely to the abstract schema (defined in the bean DeploymentDescriptor). Duh. Of course, this is the whole idea (allow the container to map to physical representation).
Which means that every token referenced in the EJBQL query, MUST relate to a token defined in the **abstract** schema, not the real schema.
Here is the corrected query:
SELECT OBJECT(b) FROM BuilderProviderAssoc b WHERE b.builderID = ?1 AND b.sectionTypeID = ?2
And from the DD:
<abstract-schema-name>BuilderProviderAssoc</abstract-schema-name>
<cmp-field >
<![CDATA[Return BuilderID]]>
<field-name>builderID</field-name>
</cmp-field>
<cmp-field >
<![CDATA[Return SectionTypeID]]>
<field-name>sectionTypeID</field-name>
</cmp-field>
"Of course...the files are IN the computer....it's so simple..." -Zoolander