Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE75B33C1 for ; Fri, 6 May 2011 21:27:23 +0000 (UTC) Received: (qmail 36641 invoked by uid 500); 6 May 2011 21:27:23 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 36598 invoked by uid 500); 6 May 2011 21:27:23 -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 36590 invoked by uid 99); 6 May 2011 21:27:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2011 21:27:23 +0000 X-ASF-Spam-Status: No, hits=4.2 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RFC_ABUSE_POST,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of chintan4181@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2011 21:27:17 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1QISY4-0007pq-11 for users@openjpa.apache.org; Fri, 06 May 2011 14:26:56 -0700 Date: Fri, 6 May 2011 14:26:56 -0700 (PDT) From: chintan4181 To: users@openjpa.apache.org Message-ID: <1304717215998-6338912.post@n2.nabble.com> Subject: createQuery(String qlString, Class resultClass) or createNamedQuery() usage MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have requirement in which query joins different attibutes from tables and retrieve result. if i use createQuery(String qlString).setParameter().resultList(). it will retun me list of Object[]. Problem with this is i need to iterate object[] and set values in my ValueObject. Can i use createQuery(String sqlString, Class resultClass). here resultClass will be my Valueobject which implements Serializable. I tried but it's not working. Is there a way to map returned Object[] to ValueObject using JPA/OpenJPA? Thanks Chintan -- View this message in context: http://openjpa.208410.n2.nabble.com/createQuery-String-qlString-Class-T-resultClass-or-createNamedQuery-usage-tp6338912p6338912.html Sent from the OpenJPA Users mailing list archive at Nabble.com.