You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Roger Keays <ro...@ninthavenue.com.au> on 2009/01/22 07:36:29 UTC

How to specify @Lob for PersistentCollection ElementColumn?

Hi,

Is it possible to specify the elements of a PersistenCollection to be 
lobs? i.e:

    @PersistentCollection
    @ElementColumn(??)
    List<String> options;

The elements are long strings.

Thanks in advance,

Roger


Re: How to specify @Lob for PersistentCollection ElementColumn?

Posted by Fay Wang <fy...@yahoo.com>.
Hi Roger,
   This function is newly added to the openjpa trunk for jpa 2.0. 
   You can specify the following so that each element in the options collection is stored in the CLOB column: 

    @ElementCollection
    @Column(columnDefinition="CLOB")
    protected List<String> options = new ArrayList<String>();

   Hope this helps.

Regards,
Fay



--- On Wed, 1/21/09, Roger Keays <ro...@ninthavenue.com.au> wrote:

> From: Roger Keays <ro...@ninthavenue.com.au>
> Subject: How to specify @Lob for PersistentCollection ElementColumn?
> To: users@openjpa.apache.org
> Date: Wednesday, January 21, 2009, 10:36 PM
> Hi,
> 
> Is it possible to specify the elements of a
> PersistenCollection to be lobs? i.e:
> 
>    @PersistentCollection
>    @ElementColumn(??)
>    List<String> options;
> 
> The elements are long strings.
> 
> Thanks in advance,
> 
> Roger