Hibernate Mapping for Oracle RAW column -


we're using hibernate , not sure how map properties raw columns in oracle table (specifically have indexes on them).

it's known fact string can't used entity property value - hibernate isn't able prepend hextoraw oracle function call in order make index on column used (cause without oracle implicitly appends rawtohex column value itself).

however, it's not clear whether using byte[] entity property value solving issue or not. since jdbc driver sending binary data directly - it's logical assume index used - cause there no need execute neither hextoraw nor rawtohex functions.

however, i'm not sure how prove (except putting million of records , performing benchmarks). tried search similar questions without success.

does has knowledge that? in advance,

final answer - yes, mapping byte[] works.

tested on table millions of records , primary key of raw type.

it took ~2 minutes lookup record pk if using string.

with byte[] record found immediately.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -