Hi,
I get this error when I try to persist an entity with a @Lob annotated
field into the PostgreSQL database in OpenJPA 3.1.2:
org.apache.openjpa.persistence.PersistenceException: ERROR: column
"configuration_file" is of type oid but expression is of type bytea
Hint: You will need to rewrite or cast the expression.
Position: 110 {prepstmnt 1442553426 INSERT INTO
NETWORK_CONFIGURATION_FILE (ID, CATALOGUE, CONFIGURATION_FILE, CREATED,
VERSION) VALUES (?, ?, ?, ?, ?)} [code=0, state=42804]
This is the configuration_file field in the entity:
@Lob
@Column(name = "CONFIGURATION_FILE", nullable = false)
private byte[] configurationFile;
I know that I can just change the column type in the database, but is it
possible to configure OpenJPA to handle @Lob fields as a large object
with oid?
Thank you.
Kind regards,
Jiří Kakrda