Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 77331 invoked from network); 21 Dec 2006 07:12:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Dec 2006 07:12:03 -0000 Received: (qmail 27322 invoked by uid 500); 21 Dec 2006 07:12:10 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 27297 invoked by uid 500); 21 Dec 2006 07:12:10 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 27288 invoked by uid 99); 21 Dec 2006 07:12:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Dec 2006 23:12:10 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of duddelfuddel@googlemail.com designates 66.249.92.171 as permitted sender) Received: from [66.249.92.171] (HELO ug-out-1314.google.com) (66.249.92.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Dec 2006 23:12:00 -0800 Received: by ug-out-1314.google.com with SMTP id y2so3084190uge for ; Wed, 20 Dec 2006 23:11:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=UirqYqNLgfdKwIoNCwMk0Mp8LAp+O6yg5VA5cY/b7qbifElacS+1ZVhBRGLVf6IbUz6cSQHmUg0fU0810OfcRsm+VzsrNw0x9Ao4JUK6vHR96sT44WK+ZhDQ2EhGs4Gr3Q+9uZx82Vwh1Wfqh6QvGagL6PP1Qp7VOia4mK4+D8A= Received: by 10.67.97.18 with SMTP id z18mr10438485ugl.1166685098969; Wed, 20 Dec 2006 23:11:38 -0800 (PST) Received: by 10.66.236.18 with HTTP; Wed, 20 Dec 2006 23:11:38 -0800 (PST) Message-ID: Date: Thu, 21 Dec 2006 08:11:38 +0100 From: "Juergen Saar" Sender: duddelfuddel@googlemail.com To: cayenne-user@incubator.apache.org Subject: Re: Lookup tables In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_37930_27674246.1166685098930" References: <466a19d0612201634x2e00a1ccv41b02ab7534f42ea@mail.gmail.com> <081F461C-BC87-4E68-8B67-CD36C3E1A6CA@ish.com.au> X-Google-Sender-Auth: 3206e29f3ac72cbc X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_37930_27674246.1166685098930 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline That much is true ... but ... it would be nice if it was possible to describe these things in the repository. I've actualy created a database that holds this additional informations and a little more like a meaningful names for attributes and entities, and made a web-Interface using Googles web-toolkit, so erveryone in our company, that can login to this Webserver, is able to add such informations. 2006/12/21, Michael Gentry : > > Making a getStatusName() and even a setStatusName() is fine for > conveniently getting the status name (and not needing a local > statusName instance variable), but if you need to use statusName in a > query, that won't do what you want -- you still need to specify the > relationships. Also, you had mentioned sorting. What exactly do you > need? There are various ways of sorting things in Cayenne. > > /dev/mrg > > > On 12/20/06, Aristedes Maniatis wrote: > > > > On 21/12/2006, at 11:34 AM, Terry Jeske wrote: > > > > > I have a project object as with the following variables: > > > > > > Project.java > > > --------------------------------- > > > int id > > > String projectName > > > String statusName > > > > > > Hibernate does not support this, and to get around it I have had to > > > create a > > > view that hibernate pulls from. We like having the status_table > > > look-up > > > because it makes it easy to return sorted lists of projects, while > > > giving us > > > the freedom to change status text. > > > > > > Put this in Project.java if you want a convenience method for this > > purpose. > > > > public String getStatusName() { > > return getStatus().getName(); > > } > > > > > > Ari Maniatis > > > > --------------------------> > > ish > > http://www.ish.com.au > > Level 1, 30 Wilson Street Newtown 2042 Australia > > phone +61 2 9550 5001 fax +61 2 9550 4001 > > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A > > > > > > > > > > > ------=_Part_37930_27674246.1166685098930--