happytomatoe / hibernate-sqlite

Automatically exported from code.google.com/p/hibernate-sqlite
0 stars 0 forks source link

Error SQLiteDialect limit not working #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Error in class SQLiteDialect method

getLimitString

implementation not work, switch the param "limit" per "offset" 

I changed the method per

public String getLimitString(String query, boolean hasOffset) {
        return new StringBuffer(query.length() + 20).append(query).append(
                hasOffset ? " limit ? , ?" : " limit ?").toString();
    }

Original issue reported on code.google.com by fcarriqu...@gmail.com on 15 May 2009 at 8:45

GoogleCodeExporter commented 9 years ago
The fix in description did not work for me.  What did work was
adding the method

    public boolean bindLimitParametersInReverseOrder() {
        return true;
    }

so limit and offset would be passed in the correct order

Original comment by john.jus...@gmail.com on 1 Jun 2011 at 2:52