cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lachlan Deck <>
Subject Re: DataRow.createObjectId deprecated without mention of alternative...
Date Thu, 24 Jan 2008 05:57:40 GMT
On 23/01/2008, at 9:12 PM, Andrus Adamchik wrote:

> No replacement API in Cayenne. This was not deemed a useful user- 
> level functionality,

It was useful to me ;-)

ObjectId rowId = dataRow.createObjectId(anObjEntity);
Map ids = rowId.getIdSnapshot();

If I'm traversing the entire database (for example to determine what  
records to queue for later processing by another thread) the above  
means I don't need to fault in the real object to obtain the primary  
key values.

> and Cayenne itself uses a private method elsewhere to create  
> ObjectId's, hence the deprecation.

Okay, so when dealing with raw rows, what's the recommended route?

Also is there an equivalent for EOEntity.qualifierForPrimaryKey 
(NSDictionary) in order to build up an or'd expression (as opposed to  
individually calling DataObjectUtils.objectForPK(ObjectContext,  
String, Map) ?

> On Jan 23, 2008, at 3:26 AM, Lachlan Deck wrote:
>> now that DataRow.createObjectId is deprecated... is there an  
>> alternate function somewhere else now that does the same thing?
>> I can easily construct a new instance, but if there's a better  
>> alternative that'd be good to know.
>> Thanks.

with regards,

Lachlan Deck

View raw message