Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 96940 invoked from network); 28 Nov 2007 09:29:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2007 09:29:53 -0000 Received: (qmail 14876 invoked by uid 500); 28 Nov 2007 09:29:40 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 14851 invoked by uid 500); 28 Nov 2007 09:29:40 -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 14842 invoked by uid 99); 28 Nov 2007 09:29:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 01:29:40 -0800 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 09:29:42 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IxJEP-00088t-BW for dev@openjpa.apache.org; Wed, 28 Nov 2007 01:29:21 -0800 Message-ID: <13988839.post@talk.nabble.com> Date: Wed, 28 Nov 2007 01:29:21 -0800 (PST) From: gav To: dev@openjpa.apache.org Subject: OpenJPA MySQL Environment: NamedQuery always returns null for @Enumerated column types MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: gavin_bayfield@hotmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hello, i have a WebsphereCE application environment (OpenEJB/OpenJPA 1.0.0/MySQL 5.0.27 with JDBC driver 3.1.14). When running a NamedQuery on the Entity Bean i find the returned object is fully populated as expected EXCEPT for the Enum(erated) type which always came back null (in error). @Entity @Table( name = "Client" ) @NamedQueries( { ... @NamedQuery( name = "Client.getClientCasenoteDataByEmpiId", query = "select c from Client c JOIN FETCH c.assets where c.epmiId = :epmiId" ), ... public class Client implements Serializable { ... @Column( name = "Gender" ) @Enumerated( EnumType.STRING ) private Gender gender = Gender.UNSPECIFIED; // This gender field in the Client object graph always comes back null despite the database having a column definition consistent with storing the enum values as strings in database. Gender varchar(255) NULL (a column definition confirmed by autogeneration by openjpa using synchronizemappings property)... Enum class is public enum Gender { MALE, FEMALE, UNSPECIFIED; For the record also tried the default ordinal approach, also the MySQL 3.1.12,3.1.14 and 5.0.4 JDBC Drivers but always get nothing back but null. Has anyone seen this problem or could point me in the right direction ??? thanks for your help ! -- View this message in context: http://www.nabble.com/OpenJPA-MySQL-Environment%3A-NamedQuery-always-returns-null-for-%40Enumerated-column-types-tf4887323.html#a13988839 Sent from the OpenJPA Developers mailing list archive at Nabble.com.