Posts Tagged ‘ postgresql ’

PostgreSQL – List indices

Indices
Just a short note about listing indices of PostgreSQL databases.

Weiterlesen

Advertisements

Saving Files in Derby with Hibernate

Snowflake

I use a byte-array to persist a file in a database with hibernate. After converting file data to a byte-array i map the byte-array to a property of type BINARY:

Entity class:

public class Attachment implements Serializable {
  private byte[] fileData;
  public byte[] getFileData() {
    return fileData;
  }
  public void setFileData(byte[] fileData) {
    this.fileData = fileData;
  }
}

Weiterlesen