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

Reply via email to