title: JPA how to set column type to be BLOB for ElementCollection table
body: <p>I'm using Spring Boot with Hibernate JPA with the following code in my entity class,</p>
  
  <pre><code>@ElementCollection
  private Map&lt;String, String&gt; userFiles= new HashMap&lt;&gt;();
  </code></pre>
  
  <p>Where a collection table <code>user_files</code> is generated. However the default column type is <code>VARCHAR(255)</code> and sometimes user data can be longer than that. My question is how can I define this table to use <code>BLOB</code> or <code>TEXT</code> for column? I tried to throw in <code>@Lob</code> annotation directly there but does not work.</p>