-
1. Re: EJB QL (JBossQL?) and Dates....
adrian.brock Aug 29, 2003 8:45 AM (in response to thegiantsquid)You'll find the CMP2.0 docs on the "Documentation link"
JBossQL lets you use Order By, the type mapping can
be configured. If the global config is incorrect, just change it
for that field.
Regards,
Adrian -
2. Re: EJB QL (JBossQL?) and Dates....
thegiantsquid Aug 29, 2003 4:29 PM (in response to thegiantsquid)Would this be the appropriate xdoclet code then:
* @ejb:finder signature="ConsolidatedMetReadingBean findLatestInBin(java.util.Date binDate)"
*
* @jboss:finder-query
* name="findLatestInBin"
* query="SELECT DISTINCT OBJECT(c) FROM ConsolidatedMetReadingBean AS c WHERE c.BinID = binDate LIMIT 1 ORDER BY IssuanceTime"
Here, IssuanceTime actually describes the record, and BinID is a Date signifying the start-time of a 15 minute interval (say 10:15 or 12:30) for which that record belongs. (So, all records released between 10:15:00:00 and 10:29:59:99 would belong to the 10:15 "Bin")
The query would retrieve the latest ConsolidatedMetReading (based on IssuanceTime) from all ConsolidatedMetReadings with that same BinID.