metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasper Sørensen (JIRA) <>
Subject [jira] [Commented] (METAMODEL-35) DB2 query with limit returns random order results
Date Tue, 21 Jan 2014 10:24:20 GMT


Kasper Sørensen commented on METAMODEL-35:

Hi Gagan,

Can you please post your patch here:

(You can self register on that site).

> DB2 query with limit returns random order results
> -------------------------------------------------
>                 Key: METAMODEL-35
>                 URL:
>             Project: Metamodel
>          Issue Type: Bug
>            Reporter: Gagan Deep Juneja
>         Attachments: 0001-Added-order-by-clause-to-the-RowNumber-Over-function.patch
>  I am using metamodel with DB2 database. I have one query where I want
> to fetch records out of database with firstRow and MaxRow clauses.
> What I found is this query doesn't work as expected and returns
> duplicate records in different pages/batches.
> I looked into the class and found that we are
> using ROW_NUMBER() OVER() function in inner query to define order but
> this is not working correctly, If I change this function call to
> include order by clause on table Id field (ROW_NUMBER() OVER(order by
> id)every thing works perfectly fine.
> Please provide your valuable inputs on how to fix this for DB2 database.
> We are using 3.4.7 version of metatmodel.

This message was sent by Atlassian JIRA

View raw message