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.setIdentifier(name);
col.setJavaType(JavaTypes.PC_UNTYPED); //was JavaTypes.STRING
col.setSize(-1);
col.setTypeIdentifier(DBIdentifier.newColumnDefinition(vm.getMappingRepository().getDBDictionary()
.xmlTypeName));
col.setXML(true);
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.
Krzysztof
--
View this message in context:
http://openjpa.208410.n2.nabble.com/XMLValueHandler-strategy-not-supported-in-Postgres-tp6331286p6331526.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.