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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Juergen Saar
Gesendet: Mittwoch, 24. Januar 2007 10:13
An: [email protected]
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 <[EMAIL PROTECTED]>:
>
> 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
>

Reply via email to