empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jan (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Created] (EMPIREDB-261) DBCommand is not re-usable, when a CLOB colum is involved
Date Wed, 12 Jul 2017 11:38:00 GMT
jan created EMPIREDB-261:
----------------------------

             Summary: DBCommand is not re-usable, when a CLOB colum is involved
                 Key: EMPIREDB-261
                 URL: https://issues.apache.org/jira/browse/EMPIREDB-261
             Project: Empire-DB
          Issue Type: Bug
          Components: Core
    Affects Versions: empire-db-2.4.6
            Reporter: jan


If you write code like this:

{quote}cmd.set(DB.col1.to(col1));
cmd.set(DB.col2.to(col2));
// ...
cmd.set(DB.clob_col.to(string));

// try update
int updateCount = this.db.executeUpdate(cmd, this.conn);

if (updateCount < 1) {
        // not found, insert
        cmd.set(DB.id.to(id));
        this.db.executeInsert(cmd, this.conn);
}{quote}

clob_col will always be empty on the first run, because DBClobData uses a Reader internally,
which is consumed on the update-try.

(Maybe BLOB/DBBlobData has the same issue)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message