0 Replies Latest reply on Dec 19, 2007 7:24 PM by Karol Oslowski

    problems with hibernate custom validators

    Karol Oslowski Newbie

      Dear all,

      I'm trying to write a custom validator as described http://www.hibernate.org/hib_docs/validator/reference/en/html/validator-defineconstraints.html#validator-defineconstraints-own

      The validator is intended for use with new users registering and he has to check whether the login given by user is still available. Therefore I need to connect with the data layer to execute a finder on users. Is there any simple way of doing that?

      @PersistenceContext
      private EntityManager em;

      doesn't help since validator aint a bean.

      Thanks in advance for any help,

      Kind Regards,

      karol