Last CVS version of EJBDoclet are using CDATA sections to encapsulate
the finder query value to 'hide' special characters like > and < (no
need for strange &gt and &lt anymore). Rickard made this fix.

This way the generated jaws.xml looked like this instead:
   <finder>
       <name>findByRefDocument</name>
       <query><![CDATA[accounting_site = {0} AND ref_site = {1} AND
ref_document = {2}]]></query>
       <order></order>
   </finder>

Ok, so far but when deployed in jBoss the query was "null". When I at
last found the place in the code where all this stuff happened the fix
was not difficult, here is the patch if anyone can confirm that it is ok
and that can commit it in CVS.

cvs -q diff MetaData.java (in directory
D:\cvs-sources\jboss\src\main\org\jboss\metadata\)
Index: MetaData.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/metadata/MetaData.java,v
retrieving revision 1.12
diff -r1.12 MetaData.java
128c128
<             if (children.item(i).getNodeType() == Node.TEXT_NODE)
---
>             if (children.item(i).getNodeType() == Node.TEXT_NODE || 
>children.item(i).getNodeType() == Node.CDATA_SECTION_NODE)

/Lennart

-- 
mailto:[EMAIL PROTECTED]
http://www.benefit.se/english

Reply via email to