From graffito-dev-return-1315-apmail-incubator-graffito-dev-archive=www.apache.org@incubator.apache.org Fri Sep 15 10:43:37 2006 Return-Path: Delivered-To: apmail-incubator-graffito-dev-archive@www.apache.org Received: (qmail 29771 invoked from network); 15 Sep 2006 10:43:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Sep 2006 10:43:37 -0000 Received: (qmail 5881 invoked by uid 500); 15 Sep 2006 10:43:36 -0000 Mailing-List: contact graffito-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: graffito-dev@incubator.apache.org Delivered-To: mailing list graffito-dev@incubator.apache.org Received: (qmail 5870 invoked by uid 99); 15 Sep 2006 10:43:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 03:43:36 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dsconnelly@adelphia.net designates 68.168.78.205 as permitted sender) Received: from [68.168.78.205] (HELO mta11.adelphia.net) (68.168.78.205) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 03:43:27 -0700 Received: from [192.168.0.8] (really [69.162.180.18]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060915104300.KWJU28624.mta11.adelphia.net@[192.168.0.8]> for ; Fri, 15 Sep 2006 06:43:00 -0400 Message-ID: <450A83D5.8010109@adelphia.net> Date: Fri, 15 Sep 2006 06:43:33 -0400 From: Dan Connelly User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: graffito-dev@incubator.apache.org Subject: AtomicTypeConversion not used when NodeTypePerHierarchy ?? Content-Type: multipart/alternative; boundary="------------070409060000020300030400" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------070409060000020300030400 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit ObjectConverterImpl#retrieveSimpleFields has this guard for one branch of its logic: * (classDescriptor.usesNodeTypePerHierarchyStrategy() && classDescriptor.hasDiscriminator()) * When that test is true, then there is *no type conversion* when the object field is set from a getValue().getString() on the node property. For my object model, this condition is true (somehow?) and I have an *int* field in the object. The int cannot be set from the String. If the inheritance strategy were not NodeTypePerHierarchy, it would work. Note that this is a test program. I pm.save the object model and then immediately do pm.getObject(root) to retrieve a second model instance. The same mapping is used for the ite and the read. I have tried this with and without extend="xxxx" class attributes in the mapping (trying to contol the inheritance stragety). It fails with and without the extends. However, my guess is that type conversion on atomic fields is needed for all inheritance strategies, even when there is a class discriminator. BTW: The DTD comment says "extends" but the !ATTLIST wants it to be "extend". Confusing. Since its optional, why would I ever want to give the "extend" in the mapping? --------------070409060000020300030400--