EJB QL has a few restrictions:
Comments are not allowed.
Date and time values are in milliseconds and use a Java long.Adate or time literal should be an integer literal. To generate a millisecond value, you may use the java.util.Calendar class.
Currently, container-managed persistence does not support inheritance. For this reason, two entity beans of different types cannot be compared.