JBoss Community

Help with EJB QL set restrictions

created by vidusha madan in EJB3 - View the full discussion

Hi

 

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.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community