[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Forcing bytea for Blobs in Postresql

Rhodan76 do-not-reply at jboss.com
Wed Dec 10 10:15:36 EST 2008

"getaceres" wrote : ... Hibernate assumes that it is oid...

No Problem, you have to redefine the default Postgres Dialect, that hibernate uses. For a better understanding: when you look in org.hibernate.dialect.PostgresDialect you will see:
	registerColumnType( Types.BLOB, "oid" );

You must extend these dialect with your own Implementation, and simple re-register the Types.BLOB to whatever you want (and postgres accepts). Then you must tell hibernate, to use your own dialect for postgres (either in hibernate.cfg or persistence.xml):
		<property name="hibernate.dialect" value="my.com.xyz.OwnPostgresDialect" />

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195642#4195642

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195642

More information about the jboss-user mailing list