Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1789

Metamodel validator thinks SQL query is a JDOQL query and fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.15.1
    • Fix Version/s: 1.16.0
    • Component/s: Core
    • Labels:
      None
    • Environment:
      LINUX

      Description

      the following SQL Query definition :

      
      @javax.jdo.annotations.Queries(Array(
        new javax.jdo.annotations.Query(
          name = "findByDescriptiveName",
          value = "SELECT "
            + "FROM domainapp.modules.system.dom.impl.FileObject "
            + "WHERE descriptiveName.indexOf(:descriptiveName) >= 0 "),
        new javax.jdo.annotations.Query(
          name = "findByApplicationComponent",
          language="SQL",
          value = "select fo.* " +
                  " from " +
                  "    FileObject fo, " +
                  "     Component_File cf, " +
                  "     ComponentObject co, " +
                  "     Application_Component ac, " +
                  "     ApplicationObject ao " +
                  " where " +
                  "    ao.name = :application and " +
                  "     ao.application_id = ac.application_id and " +
                  "     co.component_id = ac.component_id and " +
                  "     co.name = :component and " +
                  "     co.component_id = cf.component_id and " +
                  "     cf.file_id = fo.file_id ",
          resultClass=classOf[FileObject] )
        )
      )
      

      makes the metamodel validator fail thinking that the query type is JDOQL.

      domainapp.modules.system.dom.impl.FileObject: error in JDOQL query, class name for FROM clause not recognized (JDOQL : select fo.*  from  	  FileObject fo,      Component_File cf,      ComponentObject co,      Application_Component ac,      ApplicationObject ao  where  	  ao.name = :application and      ao.application_id = ac.application_id and      co.component_id = ac.component_id and      co.name = :component and      co.component_id = cf.component_id and      cf.file_id = fo.file_id )
      
      Please inspect the above messages and correct your domain model.
      

      The validator should ignore SQL query types and let DataNucleus handle it.

        Attachments

          Activity

            People

            • Assignee:
              danhaywood Dan Haywood
              Reporter:
              gerrie.myburgh@yahoo.co.uk Gerrie Myburgh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: