You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Eric Polino <er...@campgroundautomation.com> on 2008/03/24 19:27:44 UTC

Listing Attributes

Is there a way I can get a List of the attributes for a given
DBEntity?  For instance, I have a customer.  I want an iteratable list
of fields I can query on.  How can I do that?

-- 
Eric Polino
Campground Automated Systems

Re: Listing Attributes

Posted by Jean-François Smigielski <jf...@gmail.com>.
If you want to run the DbAttribute's list of your DbEntity instance, with
cayenne 3.0M3:

http://cayenne.apache.org/doc/api/org/apache/cayenne/map/DbEntity.html#getAttributes()

If you want to run the ObjAttribute's list for the ObjEntity associated to
you DbEntity, I do not know a direct way. Use an EntityResolver instance.
Anyway, this class will help you a lot:

http://cayenne.apache.org/doc/api/org/apache/cayenne/map/EntityResolver.html

Regards,

2008/3/24, Eric Polino <er...@campgroundautomation.com>:
>
> Is there a way I can get a List of the attributes for a given
> DBEntity?  For instance, I have a customer.  I want an iteratable list
> of fields I can query on.  How can I do that?
>
>
> --
> Eric Polino
> Campground Automated Systems
>


-- 
JF Smigielski