title: max length to hibernate column
body: <p>I create table using hibernate through entity.</p>
  
  <p>How to set length of an column in hibernate with maximum length.</p>
  
  <p>for example :</p>
  
  <pre><code>@Column(name="txn_details_id",nullable = false)
  private String txnId;
  </code></pre>
  
  <p>if  I use the above it will create with the <code>default size : 255</code> but i want to create this column with the maximum allowed size.</p>
  
  <p>how do i do this in hibernate?</p>
  
  <p>It would be helpful if some one helps me to set the max length for all the types.</p>
  
  <p>thanks.</p>