Ok, some SQL statements used in the EJB xdoclet defs extend beyond SQL92 causing
portability issues. To cite a particular example, from
org.jboss.nukes.core.ejb.FileEJB:
SELECT DISTINCT SUBSTRING(f.fileId, 1, LOCATE('/', f.fileId, LENGTH(?1) + 2)) FROM
file AS f WHERE f.fileId LIKE CONCAT(?1, '%/%')
This statement uses several MySQL specific extensions / names, namely: SUBSTRING(),
LOCATE(), AS x, and CONCAT()
I need a strategy for making this sort of SQL portable. Here are the options as I see
them:
1) Define Ant filters to insert DB specific code at compile time
2) Modify the XDoclet template to insert DB specific code at compile time
3) Extend XDoclet jboss tags to include something like @jboss.query.mysql, ...oracle,
etc
4) Create a set of SQL functions to mimic the desired routines
5) Create a java class to mutate the SQL statement to the DB specific format
6) Ignore problem and hope it goes away
My gut feeling is that Ant filters -or- the XDoclet template are the way to go with
this but I'd like some input from others as to the preferred route since this could
have pretty far reaching implications. Thanks!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849739#3849739
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849739
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development