0 Replies Latest reply: Apr 11, 2012 2:48 AM by vidusha madan RSS

    Help with EJB QL set restrictions

    vidusha madan Newbie



      I have a query that fetches data from a table. For this quesy I set restrictions as follows :

      private static String[] RESTRICTIONS = {

        "customerBean.customerId in (#{context.scopedCustomers})",



      If context.scopedCustomers here is null the query matches it with all the records in the table. As a result all the data is fetched and displayed.


      How can I modify/control this behaviour so that only those records are fetched where customer id is null.


      Any help would be appreciated.