Hey Ron,
I had a similar problem the what I did was to change the java bean type to be a byte array. And also kept a method in the bean (which the app itself would use) to get the BLOB field.
So in this example, we have a field of type BLOB and just trying to retrun it as a string.
Code:
public String getPassword()
{
return password;
}
public void setPassword(String password)
{
this.password = password;
}
This will end up causing you problems when returning the String. If you change your code to the following and allow hibernate to use the
getPassword() and
setPassword() method, then ur app can use the
getPasswordAsString() and just have another setPassword method which takes different params.
Code:
public byte[] getPassword()
{
return password;
}
public void setPassword(byte[] password)
{
this.password = password;
}
public void setPassword(String password)
{
setPassword(password.getBytes());
}
public String getPasswordAsString()
{
return new String(password);
}
Give that a try and let me know if this is any use to you.