Is there any way to limit the size of the QueryResults?
Simple scenario is that I have a single table with 20000 rows in it
(assume no other relationships). I'm trying to find the row which is
the newest.
My OQL is:
SELECT n FROM com.softswitch.db.model.Test n WHERE serialNumber=$1 ORDER
BY createTime desc
Due to the ordering, I only need the first object returned from the
QueryResults. Essentially what I need is:
SELECT TOP 1 n FROM com.softswitch.db.model.Test n WHERE type=$1 ORDER
BY createTime desc
in the syntax of SQL Server. Lazy loading won't help me as I understand
it since this isn't some 1:many relationship or dependent object, etc.
Thanks,
- John
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev