• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to get the type of an attribute in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get the type of an attribute in code


  • Subject: Re: how to get the type of an attribute in code
  • From: David LeBer <email@hidden>
  • Date: Wed, 27 Oct 2010 09:08:04 -0400

On 2010-10-27, at 8:57 AM, Simon wrote:

> hi all - is there an easy / quick way to figure out the type of a
> particular attribute in code ?
>
> e.g. i want to know what type (ie. Integer, BigDecimal, String) the
> column X is of entity Y



See EOEntity, EOAttribute, ERXEOAccessUtilities:

If you have an EO you can get it's entity (EOEntity).
If you know the attribute name you can get the attribute (EOAtrribute) from the entity.
If you know the column name you can get the attribute using ERXEOAccessUtilities' attributeWithColumnNameFromEntity
You can get the externalType from the attribute.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: 	http://codeferous.com
blog: 	http://davidleber.net
profile:	http://www.linkedin.com/in/davidleber
twitter:	http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >how to get the type of an attribute in code (From: Simon <email@hidden>)

  • Prev by Date: Re: how to get the type of an attribute in code
  • Next by Date: Re: how to get the type of an attribute in code
  • Previous by thread: Re: how to get the type of an attribute in code
  • Next by thread: Re: how to get the type of an attribute in code
  • Index(es):
    • Date
    • Thread