It's not so easy, I think. That would make the validation to succeed but reading a
bytea or reading an oid is completely different.
When using oid, the blob is saved in another table, so reading it will involve reading in
streaming from a table. It's a completely different system. As I'm using byte[]
for my JPA type, I expect Hibernate to read the blob when I need it, so it must go to the
blob table and read the content marked by the oid field. It's only a foreing key.
On the other hand, using bytea means saving the blob in the same table as it is defined,
so reading it will mean reading from the table that the Entity represents as a field and
not using streaming.
As the reading method is completely different, I don't think that changing the
registerColumnType call will be enough, but I can be mistaken. The type registration
changes also the way that the column is read? I mean, treating a column as content data or
as a foreing key, depending on the type.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195700#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...