We're using Hibernate and not sure how to map properties to RAW columns in Oracle table (specifically that have indexes on them).
It's a known fact that String can't be used for entity property value - Hibernate isn't able to prepend the HEXTORAW Oracle function call in order to make index on a column to be used (cause without this Oracle implicitly appends RAWTOHEX to column value itself).
However, it's not clear whether using byte[] as an entity property value is solving this issue or not. Since JDBC driver is sending binary data directly - it's logical to assume that index would be used - cause there is no any need to execute neither HEXTORAW nor RAWTOHEX functions.
However, I'm not sure how to prove it (except putting million of records and performing some benchmarks). I tried to search similar questions but without success.
Does anyone has knowledge about that? Thanks in advance,