From dev-return-8093-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Mon May 12 21:52:19 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 94392 invoked from network); 12 May 2008 21:52:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 May 2008 21:52:18 -0000 Received: (qmail 5423 invoked by uid 500); 12 May 2008 21:52:19 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 5259 invoked by uid 500); 12 May 2008 21:52:19 -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 5248 invoked by uid 99); 12 May 2008 21:52:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2008 14:52:19 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Mon, 12 May 2008 21:51:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9913B234C10C for ; Mon, 12 May 2008 14:51:55 -0700 (PDT) Message-ID: <1262819057.1210629115611.JavaMail.jira@brutus> Date: Mon, 12 May 2008 14:51:55 -0700 (PDT) From: "Patrick Linskey (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Resolved: (OPENJPA-130) Streaming LOB support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey resolved OPENJPA-130. ------------------------------------- Resolution: Fixed Resolved with Ignacio's recent work. There is still an open issue regarding Postgres and database cleanup; this will be managed through a separate JIRA issue. > Streaming LOB support > --------------------- > > Key: OPENJPA-130 > URL: https://issues.apache.org/jira/browse/OPENJPA-130 > Project: OpenJPA > Issue Type: New Feature > Components: datacache, jdbc, jpa, kernel > Reporter: Patrick Linskey > Assignee: Ignacio Andreu > Fix For: 1.1.0 > > Attachments: OPENJPA-130-2.patch, OPENJPA-130-3.patch, OPENJPA-130.patch, OPENJPA-130.patch > > > BLOB and CLOB fields can only be mapped in their entirety in OpenJPA. It would be nice to support fields of type java.io.InputStream (for BLOBs) and java.io.Reader (for CLOBs). > The usage pattern could look like so: > @Entity > public class Employee { > ... > private InputStream photoStream; > public void setPhotoStream(InputStream in) { > photoStream = in; > } > public InputStream getPhotoStream() { > return photoStream; > } > } > So, when the user wants to provide a stream, she will set the InputStream field, and when the user wants to obtain a stream, she will use the field. > The behavior of such an implementation would be a bit different than how other fields work, in that if the user set the stream and then consumed it within a single transaction, presumably no data would be written out to the database at commit time. But that is the nature of streams. > (FTR, I think that I stole this idea from an email Craig Russell sent out years ago.) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.