I think I may have found a bug regarding the storage and retrieval of LONGBLOBs in MySQL torque.
I was trying to store a byte[] in a LONGBLOB in MySQL and I got an exception (with a little of my debugging code included at the top): [junit] x_crit: Criteria:: URI.KEY_ID<=>URI.KEY_ID=[B@5ac3c9: [junit] Current Query SQL (may not be complete or applicable): SELECT FROM URI WHERE URI.KEY_ID=[B@5ac3c9 [junit] ------------- ---------------- --------------- [junit] ------------- Standard Error ----------------- [junit] java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near '[B@5ac3c9' at line 1 [junit] at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source) [junit] at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source) [junit] at org.gjt.mm.mysql.MysqlIO.sqlQuery(Unknown Source) [junit] at org.gjt.mm.mysql.Connection.execSQL(Unknown Source) [junit] at org.gjt.mm.mysql.Connection.execSQL(Unknown Source) [junit] at org.gjt.mm.mysql.Statement.executeQuery(Unknown Source) [junit] at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Unknown Source) [junit] at com.workingdogs.village.QueryDataSet.<init>(Unknown Source) [junit] at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1547) [junit] at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1502) [junit] at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1383) Looking at SqlExpression.java it seems that only Strings are quoted and escaped. It seems to me from my experimentation with MySQL that the same is true of BLOBs and LONGBLOBs. Has anyone had any experience with this issue, know how other databases handle this? Thanks in advance. CHEERS> SAM -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
