spring-projects / spring-projects/spring-modulith
Table event_publication: value too long for type
@odrotbohm is already working on this.
Since Jan 19, 2024.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
When saving an Event in PostgreSQL I get the following error:
Caused by: org.hibernate.exception.DataException: could not execute statement [ERROR: value too long for type character varying(255)] [insert into event_publication (completion_date,event_type,listener_id,publication_date,serialized_event,id) values (?,?,?,?,?,?)]
So then I forced that column to be of type bytea by creating an orm.xml in META-INF. Then I got this error:
org.hibernate.exception.SQLGrammarException: could not execute statement [ERROR: column "serialized_event" is of type bytea but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 129] [insert into event_publication (completion_date,event_type,listener_id,publication_date,serialized_event,id) values (?,?,?,?,?,?)]
How to solve this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.