Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 45633 invoked from network); 3 Sep 2009 21:30:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Sep 2009 21:30:13 -0000 Received: (qmail 62843 invoked by uid 500); 3 Sep 2009 21:30:12 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 62762 invoked by uid 500); 3 Sep 2009 21:30:12 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 62752 invoked by uid 99); 3 Sep 2009 21:30:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 21:30:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.252.110.63] (HELO web55902.mail.re3.yahoo.com) (216.252.110.63) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 03 Sep 2009 21:30:01 +0000 Received: (qmail 89253 invoked by uid 60001); 3 Sep 2009 21:29:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1252013380; bh=Q7HB+BkdH7cCbeUkI3BAuy7pwkJtiKz+RZfPa5HeUPI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=w69CT4QfGqBuv1c39exH34srnoFj2wQZ8aQB3B+G8D5i3fYxRC2XbuH7QNfLh2KaeKRzuOTDDaMxQY6Lu11Ks3lUtxJeT2l3M8wXt03B0tSR6cEuTYPqdLOtRZNLYMDv2gRpEBkoIOjvOfKDPGnVpzbrQ5wjE5v6DOYUYkAampQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=nE0pthaXIHP2UOlPOaHv6BPQLyg45/O+hQtzU35TsMOCNETS74afTFDxotwrDxCs8fFnl/awcWU9RLsYOcfMfmFcTF6NNLvDzTzQtDQzW1Bk22UV8WVKxdn0piu8SD3zP5KTofg+nX44pNPvWLJJFwl5gDPWFoUEjcFNoiOd7/E=; Message-ID: <365864.89090.qm@web55902.mail.re3.yahoo.com> X-YMail-OSG: hF9yUKsVM1mtKtRDuwhTnnFSF4zzNJpEOlX7pxXh5JwzF_aMyclg1DCtb1eQkPqlGfDoOJc1dWMNdhZcFJFBZBU2hAxNIQfUBwqML9iOVfUVqZSWBaNu9S.Re48kvT5PdVfMTe15UhTtX2HJrZHJVbOALxcep1plm40Lw_cgTfIn5cO2pDOybWYFJaTM.fAzAQ6YaBWV1bTgE0ZAj2C9EMfS2FU56UfPFcLkZ4Bpho3MWV98HqLZBmpW1uh8oiP8rrjo5MnJH7TdkNsJLvQHjF0TlKNTjFFaD7QhNhpeID8OxA-- Received: from [216.101.109.137] by web55902.mail.re3.yahoo.com via HTTP; Thu, 03 Sep 2009 14:29:40 PDT X-Mailer: YahooMailRC/1358.27 YahooMailWebService/0.7.338.2 References: <1ba389ce0909031300t6477014fm33299a54e78b1d5d@mail.gmail.com> Date: Thu, 3 Sep 2009 14:29:40 -0700 (PDT) From: Fay Wang Subject: Re: Collection of enums: supported yet? To: users@openjpa.apache.org In-Reply-To: <1ba389ce0909031300t6477014fm33299a54e78b1d5d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org This is currently supported in openjpa trunk. @ElementCollection @Enumerated(EnumType.STRING) protected List cr = new ArrayList(); where public enum CreditRating { POOR, GOOD, EXCELLENT }; Regards, Fay ----- Original Message ---- From: Matthew Adams To: users@openjpa.apache.org Sent: Thursday, September 3, 2009 1:00:59 PM Subject: Collection of enums: supported yet? Hi all, I searched the mailing list to determine the OpenJPA metadata required to store a collection of an enum type (ie, Collection, Set, List), and I noticed that Patrick answered a while ago (ca. 2007) that Kodo supports it but not OpenJPA. Is this still the case? I can't find doc in the OpenJPA reference guide that explains how to map collections of enums. I don't really need EnumSet or EnumMap, either. A plain, old Collection will do fine. If it's currently supported, how to I configure OpenJPA to store the values of an enum in a collection as that enum's name()? Thanks, Matthew -- mailto:matthew@matthewadams.me skype:matthewadams12 yahoo:matthewadams aol:matthewadams12 google-talk:matthewadams12@gmail.com msn:matthew@matthewadams.me http://matthewadams.me http://www.linkedin.com/in/matthewadams