Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 780D749F8 for ; Wed, 29 Jun 2011 13:56:27 +0000 (UTC) Received: (qmail 53753 invoked by uid 500); 29 Jun 2011 13:56:27 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 53578 invoked by uid 500); 29 Jun 2011 13:56:26 -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 53570 invoked by uid 99); 29 Jun 2011 13:56:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 13:56:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of michael.d.dick@gmail.com designates 209.85.213.46 as permitted sender) Received: from [209.85.213.46] (HELO mail-yw0-f46.google.com) (209.85.213.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 13:56:18 +0000 Received: by ywe9 with SMTP id 9so630328ywe.33 for ; Wed, 29 Jun 2011 06:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=VIx97MS8aVmFUZ3iOki+hmrEqTG6vhb8/7FkKBrV/es=; b=ZgwTv7r2eif/nDGjmYhrNtQgr1Z8k7raiwySXeSRiiHQSuPGIGcj/MJuyReT23G59S KB30HbEdPku8D5+tmciq0zwmxWa3RGVu2fW1zdx1TLEBcZcmZkJObUe0rXLfAh7p09RS is074/iremjizNvlNc+qctd5fXoQ2mj1WVYaw= Received: by 10.91.164.24 with SMTP id r24mr751660ago.52.1309355757136; Wed, 29 Jun 2011 06:55:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.201.3 with HTTP; Wed, 29 Jun 2011 06:55:37 -0700 (PDT) From: Michael Dick Date: Wed, 29 Jun 2011 08:55:37 -0500 Message-ID: Subject: Metamodel generates ListAttribute for arrays instead of SingularAttribute To: dev@openjpa.apache.org Content-Type: multipart/alternative; boundary=001485f5470ac9ea9804a6da2446 X-Virus-Checked: Checked by ClamAV on apache.org --001485f5470ac9ea9804a6da2446 Content-Type: text/plain; charset=ISO-8859-1 Does anyone remember why we generate a ListAttribute for arrays instead of a SingularAttribute? In section 6.2.1.1. the JPA spec indicates that we should generate a SingularAttribute for every non-collection-valued field, and a Collection|Set|List Attribute for their respective types. Generating a ListAttribute for a @PersistentCollection makes sense, but generating it for all arrays, doesn't look quite right. AFAICT this code was added under OPENJPA-1013, but that was a general development task. There weren't any clues to the motivation for this part of the change, except that one of the testcases does use a @PersistentCollection. At any rate, this seems wrong to me, but before I start modifying code I wanted to make sure I'm not missing something. Thanks, -mike --001485f5470ac9ea9804a6da2446--