Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 97788 invoked from network); 26 Oct 2005 10:26:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Oct 2005 10:26:24 -0000 Received: (qmail 2921 invoked by uid 500); 26 Oct 2005 10:26:24 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 2909 invoked by uid 99); 26 Oct 2005 10:26:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2005 03:26:22 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id DC7CF21F for ; Wed, 26 Oct 2005 12:26:01 +0200 (CEST) Message-ID: <2146748985.1130322361900.JavaMail.jira@ajax.apache.org> Date: Wed, 26 Oct 2005 12:26:01 +0200 (CEST) From: "Michael Bouschen (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (JDO-161) Implement new JDO 2 query tests cases concerning variables. In-Reply-To: <625031354.1128428987821.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JDO-161?page=comments#action_12355946 ] Michael Bouschen commented on JDO-161: -------------------------------------- Some comments: datastoreidentity/schema.sql: - The patch replaces table JDOQLKeywordsAsFieldNames with table NoExtent. instad of adding table NoExtent. MixedVariables.java: - Should we put parenthesis around the two contains clauses and have them on separate line, to improve readability? (team.contains(employee) & employee.firstname == 'emp1First') & (projects.contains(project) & project.name == 'orange')" UnconstrainedVariable.java: - How about replacing the test query with the folowing: SELECT FROM Employee WHERE this.hireDate > e.hireDate & e.personid = :id VARIABLES Employee e VariablesAndFields.java: - How about adding two more test queries? The first query could use a variable having a name of a field (e.g. manager): SELECT FROM Employee WHERE team.contains(manager) & manager.firstname = 'emp1First' VARIABLES Employee manager The second query uses the same filter w/o variable declaration. The query result is different because now manager denotes the field and not a variable. VariablesWithoutExtent - How about replcacing the test query with SELECT FROM Person WHERE this.personid = noExtent.id VARIABLES NoExtent noExtent There should be a NoExtent instance having the id of an exsting Person in the database, but since class NoExtent does not have an extent the query result is empty. > Implement new JDO 2 query tests cases concerning variables. > ----------------------------------------------------------- > > Key: JDO-161 > URL: http://issues.apache.org/jira/browse/JDO-161 > Project: JDO > Type: New Feature > Components: tck20 > Reporter: Michael Watzek > Assignee: Michael Watzek > Attachments: JDO-161.patch > > We need 4 new test classes, one for each of the following assertions: > - A14.6.5-1: ?? A variable that is not constrained with an explicit contains clause is constrained by the extent of the persistence capable class (including subclasses). > - A14.6.5-2: ?? If the class does not manage an Extent, then no results will satisfy the query. > - A14.6.5-3: All variables must be explicitly declared, or all variables must be implicitly declared. > - A14.6.5-4: Names are treated as variable names if they are explicitly declared via declareVariables. Otherwise, names are treated as field names if they are members of the candidate class. Finally, names are treated as implicitly defined variable names. > Details can be found on Wiki page http://wiki.apache.org/jdo/QueryTests#Variables. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira