2 Replies Latest reply on May 10, 2011 9:57 AM by Hubert Felber

    jboss ql  question

    Hubert Felber Newbie



      Can I define a EJB finder that uses also another Ejb? Does this make sense at all?


      I have EJB's  in different tables and tried a finder like this:

      I want all Objects from WorkflowEntry with an Id that is also in CurrentStep.


      SELECT OBJECT(o) FROM WorkflowEntry o WHERE o.state = ?1 AND o.id IN (SELECT CurrentStep step FROM CurrentStep step WHERE step.owner = ?2 AND step.status = ?3)


      Maybe the syntax is wrong, but before I go further I would like to know if this is possible at all.

      JBoss does not like my try and says.


      org.jboss.deployment.DeploymentException: Error compiling JBossQL statement 'SELECT OBJECT(o) FROM WorkflowEntry o WHERE o.state = ?1 and o.id IN (SELECT CurrentStep step from CurrentStep step where step.owner = ?2 and step.status = ?3)'


      Caused by: org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "SELECT" at line 1, column 71.

      Was expecting one of:

          "ABS" ...

          "COUNT" ...



      Could anyone please tell me, if this is possible and maybe what I miss?

      Also I would be glad if someone pointed me to a good documentation about this.


      Thank you