1 Reply Latest reply on Mar 18, 2008 7:22 AM by Sascha Hoffmann

    a request over 3 entitybeans

    Sascha Hoffmann Newbie

      Hello all

      I have a question about EJB 3.0. It is possible to make a request over 3 tables? In my book they say that it is but i have no idea how i get the result.
      I have already make the Beans and the ejb-ql-statement.

      the request looks like this

      @NamedQueries({
       @NamedQuery(name="LOV_User.findByName",
       query="SELECT l FROM LOV_User l WHERE l.lov_usr_user = :name AND l.lov_usr_status_sign = 'A'"),
       @NamedQuery(name="LOV_User.test",
       query="SELECT l, b, s FROM LOV_User l, LOV_User_Right b, LOV_Right_Typ s " +
       "WHERE l.lov_usr_user = b.lov_urt_user " +
       "AND b.lov_urt_right_rule_sign = s.lov_rt_right_rule_sign " +
       "AND l.lov_usr_status_sign = 'A' " +
       "AND b.lov_urt_status_sign = 'A' " +
       "AND l.lov_usr_user = :name")
      })
      


      If i deploy the Bean JBoss throw no error thats the reason i think that this must work. But in my Client i have no idea how i get the resultcolumns that include the other entityBeans.

      Can somebody help me?

      (Sorry for the bad english)