Error in JDOQL query, FROM clause not recognized in Apache ISIS metamodel validation

122 Views Asked by At

My SQL Query generates error in JDOQL query, class name for FROM clause not recognized in meta model validation.

I have defined the following queries :

@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 * "
      + "FROM FileObject ",
    resultClass=classOf[FileObject] )
  )
)

The findByApplicationComponent query language is defined as "SQL" but the isis metamodel validation reports the following :

domainapp.modules.system.dom.impl.FileObject: error in JDOQL query, class name for FROM clause not recognized (JDOQL : SELECT * FROM FileObject)

It seems that the metamodel validator is thinking that the language is JDOQL and not SQL. It is either that or I am doing something wrong. Can someone please advise.

I am using MySql as the database.

0

There are 0 best solutions below