ServiceStack/ServiceStack.OrmLite — pull request #260 by Metal10k (2013-06-25 15:33:49+00:00)
Title: Select object with byte[] is broken.... Failing unit test supplied

As of Commit 584765e3 from pull request #169 this functionality appears to be broken at line 264 OrmLiteDialectProviderBase.cs

public virtual object ConvertDbValue(object value, Type type)
{
if (value == null || value.GetType() == typeof(DBNull)) return null;

if (value.GetType() == type)
{
if (type == typeof(byte[]))
return TypeSerializer.DeserializeFromStream(new MemoryStream((byte[])value));

I would fix myself but I am not sure of the original intent of this fix so am a little wary of ammending this.

Some of my thoughts are:

if the target type is also byte, skip over this step?
create an oracle specific workaround (seems overkill since all that is required is to return the byte array as is)