Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2271

Incorrect variable generated in findEntity method when GAE is used and the identifierField attribute on @RooEntity is specified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.2.RELEASE
    • Fix Version/s: 1.1.3.RELEASE
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      When the GOOGLE_APP_ENGINE database is configured for use in a Roo project and the user has specified a value in the 'identifierField' attribute of @RooEntity, the find method has incorrect code generated. For example, if identifierField is set to 'tid', ie @RooEntity(identifierField = 'tid') the generated find method looks like:

          @Transactional
          public static Document Document.findDocument(Long id) {
              if (id == null) return null;
              Query query = entityManager().createQuery("select o from Document o where o.tid = :id").setParameter("id",tid);
          ...
      

      resulting in a compile error.

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            stewarta Alan Stewart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: