[ 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
