5 Replies Latest reply on Apr 11, 2005 2:28 AM by Jon Åkerström

    BLOB limitation issue

    Jon Åkerström Newbie

      In my EJB3 entity bean I have successfully been able to represent my small images as a blob, as instructed in the blob wiki.

      public Blob getImage()
       return this.image;

      However some of the images are a little bit bigger than 64 kb resulting in cropped images since my database is MySql.

      I have tried to fix this using
      @Column(name="image", columnDefinition="MEDIUMBLOB NOT NULL")

      , but later on I read that the columnDefinition is not yet implemented.

      So, is there a way to work around the 64kb limitation by for example using underlying hibernate configuration or hibernate specific annotations?
      Is there a way to specify that my java.sql.Blob should be represented by a MEDIUMBLOB instead of a BLOB as in the old days with standardjaws.xml ?
      Something like:

      Other strategies? And don't tell me to use filepaths instead of storing theese small images in the database - that is a whole different discussion ;-)

      Thanks in advance...