1 Reply Latest reply on Nov 16, 2009 1:39 PM by Carlos Diógenes

    EntityQuery not applying QBE properly in join

    Carlos Diógenes Newbie


      I have the following code:

      public class AvlPssFscEtapaList extends EntityQuery<AvlPssFscEtapa> {
           private static final String EJBQL = "select avlPssFscEtapa from AvlPssFscEtapa avlPssFscEtapa";
           private static final String[] RESTRICTIONS = { "avlPssFscEtapa.mdnFuncao = #{avlPssFscEtapaList.mdnFuncao}", };
           private AvlPssFscEtapa avlPssFscEtapa = new AvlPssFscEtapa();
           private MdnFuncao mdnFuncao = new MdnFuncao();
           public AvlPssFscEtapaList() {
                /* Restrição ativa por padrao: O processo de mudança de funçao deve estar ativo. */
           public AvlPssFscEtapa getAvlPssFscEtapa() {
                return avlPssFscEtapa;
           public MdnFuncao getMdnFuncao() {
                return mdnFuncao;

      As you can see, in the constructor I set a property in MdnFuncao to be used in the query restrictions, but this isn't applied. The result SQL contains only the join column in the where condition. I understand wrong how this must work and I'm doing something wrong?

      Best regards,