You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/03/02 20:24:26 UTC

svn commit: r918157 - /james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java

Author: norman
Date: Tue Mar  2 19:24:26 2010
New Revision: 918157

URL: http://svn.apache.org/viewvc?rev=918157&view=rev
Log:
Set the column length for the message content so openjpa will be smart enough to choose right column type which is able to store 1 gb of data (JAMES-114). Thx to Tim-Christian Mundth for reporting

Modified:
    james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java

Modified: james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java?rev=918157&r1=918156&r2=918157&view=diff
==============================================================================
--- james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java (original)
+++ james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java Tue Mar  2 19:24:26 2010
@@ -24,6 +24,7 @@
 
 import javax.persistence.Basic;
 import javax.persistence.CascadeType;
+import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
@@ -43,7 +44,8 @@
     @Id@GeneratedValue private long id;
 
     /** The value for the body field. Lazy loaded */
-    @Basic(optional=false, fetch=FetchType.LAZY) @Lob private byte[] content;
+    /** We use a max length to represent 1gb data. Thats prolly overkill, but who knows */
+    @Basic(optional=false, fetch=FetchType.LAZY) @Column(length=1048576000) @Lob private byte[] content;
     /** Headers for this message */
     @OneToMany(cascade = CascadeType.ALL, fetch=FetchType.LAZY) private List<JPAHeader> headers;
     /** The first body octet */



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org