Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 7543 invoked from network); 14 Aug 2007 13:18:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Aug 2007 13:18:31 -0000 Received: (qmail 18445 invoked by uid 500); 14 Aug 2007 13:18:28 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 18422 invoked by uid 500); 14 Aug 2007 13:18:28 -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 18398 invoked by uid 99); 14 Aug 2007 13:18:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2007 06:18:28 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwsutter@gmail.com designates 209.85.146.183 as permitted sender) Received: from [209.85.146.183] (HELO wa-out-1112.google.com) (209.85.146.183) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2007 13:18:22 +0000 Received: by wa-out-1112.google.com with SMTP id m28so2441641wag for ; Tue, 14 Aug 2007 06:18:02 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=rjWCJBb6DUTpXY1zwwGkE/nApne51DhXm+O+u+BoIiSvVqh7dDVjj/3xNtRSHHDiojiL6LVpn/gT4cZ462211typl1NMZ93hQZXBxVao8xz2LXsPU3n5i7AXYoHF4i/qLUXXZ7ijvF5N4IDtdAB4yGI9zJiHUcndagP9wnpvBH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ijKZj8e4ujCqvd/Ab9krWroZ7z8V2ePYthTKssCfIgKO3i/vN5eSOnze7bpnfU73Ffy3Hce14VBtHpP07sswH6ZkYnpiDlS5EdwnBZv04FZnAVKpP7GNWSnod3wWXBjqr3pPOjYBOGNvTwQhj5SMnsR7deiWLVlRRf43RxYjjtI= Received: by 10.115.46.9 with SMTP id y9mr1562403waj.1187097481846; Tue, 14 Aug 2007 06:18:01 -0700 (PDT) Received: by 10.114.75.15 with HTTP; Tue, 14 Aug 2007 06:18:01 -0700 (PDT) Message-ID: <89c0c52c0708140618l3d2f22a8re2646d0d8a8cb073@mail.gmail.com> Date: Tue, 14 Aug 2007 08:18:01 -0500 From: "Kevin Sutter" To: users@openjpa.apache.org Subject: Re: Subclasses instances and query In-Reply-To: <12143287.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_199876_32455453.1187097481716" References: <12093140.post@talk.nabble.com> <12143287.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_199876_32455453.1187097481716 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Janek, Your problem description sounds very similar to JIRA Issue OPENJPA-143 ( https://issues.apache.org/jira/browse/OPENJPA-143). At least the first bullet in the Issue concerning the "requirement" to put the @DiscriminatorValue on abstract classes. We are still hoping to get this resolved in our 1.0.0 release... Thanks, Kevin On 8/14/07, janek wrote: > > > I know where the problem is. > > I am using InheritanceType.SINGLE_TABLE and it seems that OpenJPA does not > store any class identificatior in table. Information about class is > reconstructed from NULL and NON NULL fields. So if subclass declares some > fields which are null, OpenJPA does not have any informations which can > lead > to original class and simply use class declareted in Query. > > Collumn for this info should be created automaticly as is specified in > JPA. > > http://java.sun.com/javaee/5/docs/api/javax/persistence/DiscriminatorColumn.html > > But OpenJPA does not create it automatically. There is entire chapter > about > that in manual. > > Solution: @DiscriminatorColumn on root class of hierarchy. > > Regards, > Jan > > -- > View this message in context: > http://www.nabble.com/Subclasses-instances-and-query-tf4249297.html#a12143287 > Sent from the OpenJPA Users mailing list archive at Nabble.com. > > ------=_Part_199876_32455453.1187097481716--