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 @@
     @i...@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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to