2 Replies Latest reply on Jun 2, 2009 1:58 PM by John Augusto Charnet

    JpaIdentityStore lookupUser

    John Augusto Charnet Newbie

      Hello,
      I'm  trying to use Seams security with Eclipselink, and I'm getting an error with the query created no the user entity from seam.
      The method lookupUser from the class JpaIdentityStore, creates the query with the following code:



      Object user = lookupEntityManager().createQuery(
                  "select u from " + userClass.getName() + " u where " + userPrincipalProperty.getName() +
                  " = :username")
                  .setParameter("username", username)
                  .getSingleResult();



      The userClass.getName() will return a fully qualified class name (with the package). Is this a correct approach ? Wouldn't it be better to use the  getSimpleName() method from the Class class ?
      I'm saying this because Eclipselink gives me a syntax error because of the package.


      Any thoughts ?


      Thanks,


      John