[
https://issues.apache.org/jira/browse/ISIS-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16300344#comment-16300344
]
ASF subversion and git services commented on ISIS-1789:
-------------------------------------------------------
Commit 749f8a7c8680beed0010a0a2265a1e74fc4e15f4 in isis's branch
refs/heads/master from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=749f8a7 ]
ISIS-1789: metamodel validator for queries now is a no-op if the language is
not "JDOQL"
> Metamodel validator thinks SQL query is a JDOQL query and fails
> ---------------------------------------------------------------
>
> Key: ISIS-1789
> URL: https://issues.apache.org/jira/browse/ISIS-1789
> Project: Isis
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.15.1
> Environment: LINUX
> Reporter: Gerrie Myburgh
> Assignee: Dan Haywood
> Priority: Minor
> Fix For: 1.16.0
>
>
> the following SQL Query definition :
> {code:java}
> @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] )
> )
> )
> {code}
> makes the metamodel validator fail thinking that the query type is JDOQL.
> {noformat}
> 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.
> {noformat}
> The validator should ignore SQL query types and let DataNucleus handle it.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)