Problem solved on NamedQueries