When looking in my server.log I see the following is created:

17:53:36,498 DEBUG: EJB-QL: SELECT OBJECT(o) FROM GenericRelation o WHERE 
(o.parent_type = ?1)
17:53:36,498 DEBUG: SQL: SELECT  FROM glb_gen_relation t0_o WHERE 
((t0_o.parent_type = ?))

I was expecting it to generate this SQL:
17:53:36,498 DEBUG: SQL: SELECT t0_o.id FROM glb_gen_relation t0_o WHERE 
((t0_o.parent_type = ?))

Can anyone see what might be wrong? Naturally, I get Sql Exceptions regarding 
faulty Sql when I call that finder method..

I am using MySql, and my query definition and my table:

 
        <query-method>
          <method-name>findItemsBelongingToParent</method-name>
          <method-params>
            <method-param>java.lang.Integer</method-param>
          </method-params>
        </query-method>
        <ejb-ql>SELECT OBJECT(o) FROM GenericRelation o WHERE (o.parent_type = 
?1)</ejb-ql>
      

create table glb_gen_relation (
        id      INT AUTO_INCREMENT, primary key (id),
        parent_type int not null,
        node int not null
);

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932877#3932877

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932877


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to