Dan Haywood created ISIS-698:
--------------------------------
Summary: Allow JDOQL to be able to select scalars (eg project
individual field(s)) rather than entire entities.
Key: ISIS-698
URL: https://issues.apache.org/jira/browse/ISIS-698
Project: Isis
Issue Type: Improvement
Components: Objectstore: JDO
Affects Versions: objectstore-jdo-1.3.0
Reporter: Dan Haywood
Assignee: Dan Haywood
Priority: Minor
Fix For: objectstore-jdo-1.4.0
a typical (currently supported) query is:
@javax.jdo.annotations.Query(
name = "findByPropertyAndType", language = "JDOQL",
value = "SELECT "
+ "FROM org.estatio.dom.lease.LeaseTerm "
+ "WHERE leaseItem.type == :leaseItemType "
+ " && leaseItem.lease.occupancies.contains(lu) "
+ " && (lu.unit.property == :property) "
+ "VARIABLES org.estatio.dom.lease.Occupancy lu"),
this ticket is to support queries of the form (note the "SELECT startDate"):
@javax.jdo.annotations.Query(
name = "findStartDatesByPropertyAndType", language = "JDOQL",
value = "SELECT startDate "
+ "FROM org.estatio.dom.lease.LeaseTerm "
+ "WHERE leaseItem.type == :leaseItemType "
+ " && leaseItem.lease.occupancies.contains(lu) "
+ " && (lu.unit.property == :property) "
+ "VARIABLES org.estatio.dom.lease.Occupancy lu")
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)