thx, it works like this:
ObjEntity entity = context.getEntityResolver().lookupObjEntity(Tracking.class);
ObjAttribute attribute = (ObjAttribute) entity.getAttribute(Tracking.NOCHANGE_ALLOWED_PROPERTY);
System.out.println(attribute.getDbAttributeName());
-----Ursprüngliche Nachricht-----
Von: duddelfudde..ooglemail.com [mailto:duddelfuddel@googlemail.com] Im Auftrag von Juergen Saar
Gesendet: Mittwoch, 24. Januar 2007 10:13
An: use..ayenne.apache.org
Betreff: Re: converting property-names to db-names
Just 1 more hint:
getDataContext().getEntityResolver().lookupObjEntity(DataObject)
brings back the ObjEntity for this DataObject.
There you can find a list of all ObjAttributes and each ObjAttribute
includes the information about the DbAttribute
2007/1/24, Peter Schröder <Peter.Schroede..reenet-ag.de>:
>
> hi,
>
> is there a cayenne method that gives me the db-name of a property bye its
> cayenne-class-property?
>
> i searched the code but didnt find anything...
>
> kind regards
> peter
>
This archive was generated by hypermail 2.0.0 : Wed Jan 24 2007 - 07:57:46 EST