[ https://issues.apache.org/jira/browse/ISIS-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16107365#comment-16107365 ]
Dan Haywood commented on ISIS-1673: ----------------------------------- hmm, seems ok. The regex that pulls out the table name is: {code} private final static Pattern fromPattern = Pattern.compile("SELECT.*?FROM[\\s]+([^\\s]+).*", Pattern.CASE_INSENSITIVE); {code Note the "SELECT.*?FROM", in other words this is a non-greedy match. As such it will correctly locate IncomingInvoice rather than PaymentLine. > [CAN'T REPRODUCE] jdoqlFromClause validator is too strict, does not allow for > NOT EXISTS > ---------------------------------------------------------------------------------------- > > Key: ISIS-1673 > URL: https://issues.apache.org/jira/browse/ISIS-1673 > Project: Isis > Issue Type: Improvement > Affects Versions: 1.14.0 > Reporter: Dan Haywood > Assignee: Dan Haywood > Priority: Minor > Fix For: 1.15.0 > > > For example: > {code} > @Query( > name = > "findNotInAnyPaymentBatchByApprovalStateAndPaymentMethod", language = "JDOQL", > value = "SELECT " > + "FROM org.estatio.capex.dom.invoice.IncomingInvoice > " > + "WHERE !(SELECT invoice " > + " FROM > org.estatio.capex.dom.payment.PaymentLine).contains(this) " > + " && approvalState == :approvalState " > + " && paymentMethod == :paymentMethod " > + "ORDER BY invoiceDate ASC " // oldest first > ), > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)