Post a bug report. By the way, why is it useful? What are you going to use a byte parameter for?
I store a MD5 hash of a user password in this field. Anyway, there's nothing that prevents me to storing this information converted to hexa (in a string field)...
Interesting idea. I like to hear about example uses, because it helps me remember what to check for when coding.
Here are two examples of usage of byte as an
Entity bean attribute( field).
1) In the field of enterprise applications there is often
need for enterprise-wide object identifiers. Couple of
standards describe them, but common nature for them is
that are purely binary strings ( or binary arrays).
They have nothing to do with character strings and
consequently mapping them to character strings is unwanted
complication and overhead.
At the Java level byte handles properly those object identifiers, at the JDBC level varbinary do the same
and at the DB level Oracle's RAW or PostgreSQL's bytea is proper datatype.
2) In the security field many applications have to handle
entities like certificates, keys, fingerprints, etc.
Again, their nature is purely binary string, they have nothing to do character strings in most cases.
*) Mapping something whose nature is to be binary string
to charcter string
is problematic from performance point of view, because
all subsystems underneath believe that it really is
character string and behave accordingly:
-- Java String checks whether character sets are
handled properly when content leaves/arrives it.
-- JDBC drivers checks the same thing
-- Database checks how the incoming character string
maps to its own configured character-set.
In some cases it is possible that some system part actually changes the content of data due to character set