jpql « MySQL « JPA Q&A

1. Database design for Group Notification System

I am trying to create a group notification system. If I am in a group, then anyone who comment on the group's wall, a notification will send out to every group ...

2. Help translating SQL to JPQL

Can someone help me translate this one to JPQL ? I´ve had no luck so far..

 TRUNCATE((TO_DAYS(NOW())-TO_DAYS(kindGeburtstag))/30, 0) AS "Alter"
 FROM Kinder;
Thanks in advance.