1 Reply Latest reply on Jun 15, 2006 2:05 AM by kingofhawks

    EM query error

    kingofhawks

      Hi:
      I have some classes like following:
      License references LicenseFile,LicenseFile references Product,Product references NEKey.
      When i issue Query q=em.createQuery("select l from License l where l.licenseFile.product.nekey=:NEKEY");
      This will raise exceptions that property product does not exist!But Query q=em.createQuery("select lf from LicenseFile lf where lf.product.nekey=:NEKEY"); does work OK.
      I also try to issue Query q=em.createQuery("select l from License l where l.licenseFile in (select lf from LicenseFile where lf.product.nekey=:NEKEY)"); which will cause NullPointerException.
      All getter/setter methods are provided.
      Any advice is appreciated.
      Thanks!
      Kingofhawks