Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 60556 invoked from network); 12 Jul 2005 12:37:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Jul 2005 12:37:04 -0000 Received: (qmail 13218 invoked by uid 500); 12 Jul 2005 12:36:59 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 13194 invoked by uid 500); 12 Jul 2005 12:36:59 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 90530 invoked by uid 99); 12 Jul 2005 09:58:57 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) From: "Jan Ole Brenna" To: Subject: betwixt 0.7RC2 suppress elements Date: Tue, 12 Jul 2005 11:58:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcWGyEeCwErkJuX7T8mSlbwdygF3Hw== X-Authenticated-Sender: jobrenna@solarsoft.no X-Spam-Processed: wst3.wstech.no, Tue, 12 Jul 2005 12:00:59 +0200 (not processed: message from valid local sender) X-MDRemoteIP: 213.145.188.50 X-Return-Path: jobrenna@solarsoft.no X-MDaemon-Deliver-To: commons-dev@jakarta.apache.org X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20050712095853.9F39710FB2A6@asf.osuosl.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I'm using betwixt to transfer my object graph to xml. The objekt graph are persistent pojo beans managed by hibernate. My problem is that betwixt traverses the complete objekt graph, triggering hibernate to load all lazy collections. And I'm ending up with almost loading the whole database. I don't wont that, I would like to prevent betwixt from traversing the lazy parts of my graph. Hibernate has a method to check if a lazy collection is loaded, in order to use this method I have to have the value for a given property(element). PropertySuppressionStrategy.suppressProperty can't be used since values of properties are not known at that time (of course). The method for suppressing attributes: ValueSuppressionStrategy.suppressAttribute(AttributeDescriptor attributeDescriptor, String value) can't be used since it is called for simple properties only. (And I don't want the output beanWriter.getXMLIntrospector().getConfiguration().setAttributesForPrimitive s(true) gives) If I had a method for suppressing elements eg: boolean suppressElement(xxxx, Object value){ and this metod was checked before writing every element this would be simple to achive. regards Jan Ole --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org