kyters / jlibs

Automatically exported from code.google.com/p/jlibs
1 stars 0 forks source link

Upsert annotation generates bad SQL: insert stmt missing ) before VALUES #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the @Upsert annotation generates SQL that has a missing ")" after the 
column names list for the insert() portion.  For example:

    @Override //@Upsert
    public void updateSession(java.lang.String where_sessionid, java.lang.String folderPath){
        int count = update("SET "+jdbc.quote("folder_path")+"=? WHERE "+jdbc.quote("sessionid")+"=?", folderPath, where_sessionid);
        if(count==0)
            insert("("+jdbc.quote("sessionid")+", "+jdbc.quote("folder_path")+" VALUES(?, ?, ?, ?)", where_sessionid, folderPath);
    }

Note the missing ) before VALUES in the insert() call.

Original issue reported on code.google.com by vladim...@dugeo.com on 13 Feb 2012 at 8:35

GoogleCodeExporter commented 9 years ago
FIXED IN revision 1723;

thanks for reporting the issue;

Original comment by santhosh.tekuri@gmail.com on 14 Feb 2012 at 2:16