Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 24297 invoked from network); 7 Oct 2008 22:17:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Oct 2008 22:17:36 -0000 Received: (qmail 19453 invoked by uid 500); 7 Oct 2008 22:17:35 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 19428 invoked by uid 500); 7 Oct 2008 22:17:35 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 19417 invoked by uid 99); 7 Oct 2008 22:17:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2008 15:17:35 -0700 X-ASF-Spam-Status: No, hits=-1999.9 required=10.0 tests=ALL_TRUSTED,DNS_FROM_SECURITYSAGE X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2008 22:16:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AE9F3234C1E4 for ; Tue, 7 Oct 2008 15:16:45 -0700 (PDT) Message-ID: <682946068.1223417805707.JavaMail.jira@brutus> Date: Tue, 7 Oct 2008 15:16:45 -0700 (PDT) From: "Simone Gianni (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-740) In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org In MySQL use LONGBLOB, MEDIUMBLOB etc.. when needed, cause BLOB only holds 64kb of data. ---------------------------------------------------------------------------------------- Key: OPENJPA-740 URL: https://issues.apache.org/jira/browse/OPENJPA-740 Project: OpenJPA Issue Type: Improvement Components: sql Affects Versions: 1.2.0 Reporter: Simone Gianni When a column is annotated as a BLOB of using @Persistent to use streaming blobs, and the underlying database is MySQL, OpenJPA will create a column of type BLOB. Unfortunately, in MySQL a BLOB column can hold a (vary) limited amount of data, while (especially when using streaming blobs) the user would probably expect it to hold a large amount of data. Also adding the @Column annotation and specifying a size bigger than what a BLOB column in MySQL can hold, OpenJPA still creates only a BLOB column. I think OpenJPA should be able to create the proper column type depending on the @Column annotation if present, or otherwise default at least to a MEDIUMBLOB to preserve cross-database compatibility as expected. The simplest patch i can think of is setting blobTypeName="MEDIUMBLOB" in the MySQLDictionary constructor. Otherwise, overriding the getTypeName to properly parse the length and return the correct BLOB/TEXT type for mysql. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.