openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof <>
Subject Re: XMLValueHandler strategy not supported in Postgres?
Date Wed, 04 May 2011 16:32:35 GMT
Seems I resolved these two problems by changing java type to PC_UNTYPED and
type to SQLXML in slightly changed XMLValueHandler from openjpa source tree:

     public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io,
        boolean adapt) {
        Column col = new Column();
        col.setJavaType(JavaTypes.PC_UNTYPED); //was JavaTypes.STRING
        col.setType(Types.SQLXML);	// new, otherwise CLOB is picked up. 
        return new Column[]{ col };

I'm not sure how generic is this though.

XML is stored and reconstructed JAXB objects look ok now.

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message