Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 32092 invoked from network); 6 Sep 2005 02:10:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Sep 2005 02:10:54 -0000 Received: (qmail 91879 invoked by uid 500); 6 Sep 2005 02:10:53 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 91539 invoked by uid 500); 6 Sep 2005 02:10:51 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 91526 invoked by uid 99); 6 Sep 2005 02:10:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 19:10:51 -0700 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) Received: from [165.98.153.184] (HELO ags01.agsoftware.dnsalias.com) (165.98.153.184) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 19:11:04 -0700 Received: from [10.0.0.7] (apoyo.agsoftware.dnsalias.com [10.0.0.7]) by ags01.agsoftware.dnsalias.com (8.13.1/8.13.1) with ESMTP id j862Al8l002709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 5 Sep 2005 21:10:48 -0500 Message-ID: <431CFAA7.8080800@agssa.net> Date: Mon, 05 Sep 2005 21:10:47 -0500 From: Antonio Gallardo Organization: AG Software, S. A. User-Agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: SQLTransformer References: <60032.194.149.247.8.1125756450.squirrel@webmail.paiwastoon.com.af> <431AC270.6050406@nada.kth.se> <431B7F74.7050100@agssa.net> <431BF8A7.1070401@mobilebox.pl> In-Reply-To: <431BF8A7.1070401@mobilebox.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on agssa.net X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Leszek Gawron wrote: > Antonio Gallardo wrote: > >> I will suggest OJB instead - http://db.apache.org/ojb/. > > On the contrary I strongly recommend Hibernate :) > >> I was working on a hibernate the last weeks and I need to say that I >> prefer OJB. Here 2 samples: >> >> 1-When using a java List for a collection inside a bean, in Hibernate >> the table need an additional field to manage the order of the table >> rows! What is that? > > That is the persistent order of your collection. A list needs to know > what is the sequence of it's child beans. How do you do it in OJB? Using "orderby" attribute - http://db.apache.org/ojb/docu/guides/repository.html#collection-descriptor There is no need of an extra field. > >> 2-I don't want in my database more fields than what I need, so let >> replace the Java List witth a Java Set --> then I meet a new problem: >> cforms binding use jxpath and jxpath don't work with Sets. jxpath >> throws an Unsupported Operation Exception! Boom! > > strange: > > xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" > xmlns:ci="http://apache.org/cocoon/include/1.0" > path="/" > > row-path="questionDefinitions" direction="load"> > > > > > > > > > > > In this case I have bound SurveyDefinition.questionDefinitions > collection and it works. In my case, I met the Unsupported Operation Exception in jxpath using @direction="save" not while loading a not with a repeater, but using a cform multivalue field. > >> I wonder how people using hibernate deal with this situations. The >> 1st shows me a poor database desing and the second a restriction to >> use cforms at all! > > I still do not get why this is a poor database design. In hibernate > you can use: > > 1. unordered set > 2. a treeset ordered with Comparable contract > 3. a List which has a persistent order of your choice. > > Only the third choice for obvious reasons needs an indexing column. What is the obvious reason? IMO, an additional index field shows a poor database design. Best Regards, Antonio Gallardo.