Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54B32D7AC for ; Fri, 19 Oct 2012 12:23:41 +0000 (UTC) Received: (qmail 57580 invoked by uid 500); 19 Oct 2012 12:23:41 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 57261 invoked by uid 500); 19 Oct 2012 12:23:38 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 57231 invoked by uid 99); 19 Oct 2012 12:23:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 12:23:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 19 Oct 2012 12:23:29 +0000 Received: (qmail 2909 invoked from network); 19 Oct 2012 12:25:53 -0000 Received: from unknown (HELO ?192.168.1.55?) (194.158.197.10) by vorsha.objectstyle.org with SMTP; 19 Oct 2012 12:25:53 -0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Metadata access From: Andrus Adamchik X-Priority: 3 (Normal) In-Reply-To: <3571.209.212.102.102.1350638161.squirrel@webmail.xsinet.co.za> Date: Fri, 19 Oct 2012 15:23:24 +0300 Content-Transfer-Encoding: 7bit Message-Id: <8FD444C2-B19F-4085-AE6C-E5C61056D26C@objectstyle.org> References: <3571.209.212.102.102.1350638161.squirrel@webmail.xsinet.co.za> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org Yes, this is the correct way. On Oct 19, 2012, at 12:16 PM, dollj@xsinet.co.za wrote: > Hi > > How can one find out through the API if a CayenneDataObject property > (field/column) is Mandatory or not ? > > Currently using 3.1B1 i'm doing something like the following: > > attribMap = Cayenne.getObjEntity( dbDataObj ).getAttributeMap(); > attribMap.get( fieldPropertyName ).isMandatory(); > > Is this the correct way of going about it ? > > Is there a way of getting this info through the CayenneDataObject itself ? > > Thanks > > >