Hi,
Im using the following JBoss-QL query in JBoss 3.2.3 for a ejbSelect method:
SELECT OBJECT(p) FROM Category AS c, IN (c.products) AS p
WHERE c = ?1
AND p.state IS NOT NULL
AND p.state = 'passiv'
ORDER BY p.name
OFFSET ?2
LIMIT ?3
But as yoy can see in the following the generated sql does not contain the OFFSET &
LIMIT options.
21:02:35,221 DEBUG [Category#ejbSelectActiveProducts] SQL:
SELECT t0_p.productId, t0_p.type, t0_p.manufacturer, t0_p.productLink,
t0_p.name, t0_p.description, t0_p.listPrice, t0_p.marge, t0_p.porto, t0_p.state,
t0_p.registered, t0_p.modified, t0_p.weight, t0_p.keyWords, t0_p.category_fk
FROM t_category t1_c INNER JOIN t_product t0_p ON
t1_c.categoryId=t0_p.category_fk
WHERE (t1_c.categoryId=?)
AND t0_p.state IS NOT NULL
AND t0_p.state = 'passiv'
ORDER BY t0_p.name ASC
I have also downloaded jboss-3.2.5, but the generated sql is here too missing the
OFFSET & LIMIT options.
Then I experimented with the EJBQLToSQL92Compiler setting in
(jboss-3.2.5/server/default/conf/standardjbosscmp-jdbc.xml) but that does not help
either.
What else could I try?
Has anybody managed to get this working?
Regards
Andreas
------------------------------------------------
Code snippets from the class:
* @jboss.query
* description="This generates jboss-ql and overwrites the original query from
the ejbSelectMethod"
* signature="java.util.Collection ejbSelectActiveProducts(
my.domain.catalog.interfaces.CategoryLocal category, int start, int count )"
* query="SELECT OBJECT(p) FROM Category AS c, IN (c.products) AS p WHERE c = ?1
* AND p.state IS NOT NULL
* AND p.state = 'passiv'
* ORDER BY p.name OFFSET ?2 LIMIT ?3"
* strategy="on-load"
* page-size="128"
*
* @jboss.persistence
* create-table="${jboss.create.table}"
* remove-table="${jboss.remove.table}"
*/
public abstract class CategoryEJB implements EntityBean
{
...
/**
* @ejb.select
* query="SELECT OBJECT(p) FROM Category AS c, IN (c.products) AS p WHERE c =
?1
* AND p.state IS NOT NULL
* AND p.state = 'passiv'"
*/
public abstract Collection ejbSelectActiveProducts( CategoryLocal category, int
start, int count ) throws FinderException;
------------------------------------------------
<jbosscmp-jdbc>
...
<ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.EJBQLToSQL92Compiler</ql-compiler>
....
</jbosscmp-jdbc>
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840824#3840824
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840824
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user