|
votefavorite
|
Hello experts,
i'm trying to develop a function that count number of rows with specific arguments: for example i want to count the number of dossier which the client is 'client a' i want to get it in a table the first case contain the name of client and the second contanint the number of dossier for example client a |5 client b |12 ....
|
result exple
`Client | Count Row1: A 5 Row2: B 6 .....`
i wrote this function in my sessionbean
public List<Object[]> countrow(){ Query query= em.createQuery("SELECT d.client,COUNT(d.client) FROM Dossier d group by d.client "); return query.getResultList(); }
when i drag and drop it from the datacontrol i get an empty list...

i'm using jdevoper 12.1.3 and jpa2.0