Skip to content

Commit

Permalink
Merge pull request #3492 from mapfish/Fix-Lob-Column
Browse files Browse the repository at this point in the history
Use backward compatible column type
  • Loading branch information
sebr72 authored Oct 31, 2024
2 parents 8caf357 + a580a42 commit 076c971
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package org.mapfish.print.servlet.job.impl.hibernate;

import java.net.URI;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import org.mapfish.print.servlet.job.impl.PrintJobResultImpl;

/** Extension of Print Job Result that holds data as BLOB. */
@Entity
public class PrintJobResultExtImpl extends PrintJobResultImpl {

@Column @Lob private byte[] data;
@Column(length = 1000000000)
@Basic
private byte[] data;

/** Default Constructor. */
public PrintJobResultExtImpl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<bean id="mfDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.h2.Driver" />
<property name="url" value="jdbc:h2:mem:dbtest;DB_CLOSE_DELAY=-1" />
<property name="url" value="jdbc:h2:mem:dbtest;DB_CLOSE_DELAY=-1;MODE=PostgreSQL;INIT=CREATE DOMAIN IF NOT EXISTS JSONB AS JSON;" />
<property name="username" value="jobs" />
<property name="password" value="jobs" />
</bean>
Expand Down

0 comments on commit 076c971

Please sign in to comment.