ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Alvarsson" <jonathan.alvars...@gmail.com>
Subject "doing a bitwise AND" or "iBatis catches &?"
Date Wed, 28 May 2008 09:33:24 GMT
I am trying to perform bitwise AND in a select statement. I think the syntax
would be something like:

    <select id="Structure.fingerPrintSubsetSearch"
            resultMap="Structure"
            parameterClass="java.util.Map">
        SELECT
            <include refid="BaseObject-fields" />,
            <include refid="Structure-fields"  />
        FROM
            Structure s INNER JOIN BaseObject b ON
            s.baseObject = b.id
        WHERE
            s.persistedFingerprint & #param:BINARY# = #param:BINARY#
    </select>

But I am not sure about it. One problem is that the XML-parser says: "The
entity name must immediately follow the '&' in the entity reference." so I
can't really see what my database system thinks about it (HSQLDB) Perhaps
you can help me? My param is a byte[] btw...

-- 
// Jonathan

Mime
View raw message