cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Schröder <Peter.Schroe...@freenet-ag.de>
Subject AW: converting property-names to db-names
Date Wed, 24 Jan 2007 12:56:16 GMT
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: duddelfuddel@googlemail.com [mailto:duddelfuddel@googlemail.com] Im Auftrag von Juergen
Saar
Gesendet: Mittwoch, 24. Januar 2007 10:13
An: user@cayenne.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.Schroeder@freenet-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
>

Mime
View raw message