Hi,

I have the following SQL query definition in scala : 
@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] )
  )
)findByApplicationComponent has the language defined as SQL but the metamodel 
validator thinks it is a JDOQL.  How can I define the query to be SQL so that 
DataNucleus will process it is such? 

################################################ ISIS METAMODEL VALIDATION 
ERRORS ###################################
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.
################################################ ISIS METAMODEL VALIDATION 
ERRORS ###################################
Thanks
Gerrie Myburgh  

Reply via email to