-
-
Notifications
You must be signed in to change notification settings - Fork 375
Closed
Labels
acceptedIssue has been accepted and inserted in a future milestoneIssue has been accepted and inserted in a future milestoneas-designedThe behaviour is correct/expectedThe behaviour is correct/expectedenhancement
Milestone
Description
The following RQL from the sample "activerecord_showcases" throws an exception with MS SQLServer:
cRQL2 = 'and(eq(City,"Rome"),or(contains(CompanyName,"GAS"),contains(CompanyName,"Motors")))';
...
lCustList := TMVCActiveRecord.SelectRQL<TCustomer>(cRQL2, 20);
because the resulting SQL has no ORDER BY clause:
'SELECT id, code,description,city,rating,note FROM customers WHERE ((city = ''Rome'') and ((LOWER(description) LIKE ''%gas%'') or (LOWER(description) LIKE ''%motors%''))) /*limit*/ OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY'
Offset/Fetch have to be used with the order by clause, I think this must be done in the SQL generator of MS SQLServer.
Metadata
Metadata
Assignees
Labels
acceptedIssue has been accepted and inserted in a future milestoneIssue has been accepted and inserted in a future milestoneas-designedThe behaviour is correct/expectedThe behaviour is correct/expectedenhancement