cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: Obtain relationship target objects of a DataObject
Date Wed, 23 Sep 2009 13:36:56 GMT
Hi Andrus,

thanks for your reply!

Andrus Adamchik schrieb:
> On Sep 21, 2009, at 12:49 AM, Andreas Hartmann wrote:
> 
>> But apparently object.readProperty(…) doesn't return a list of the 
>> existing target objects.
> 
> It does and the code looks correct to me. Doublecheck that "name" 
> corresponds to a property mapped as to-many relationship.

Apparently it was a concurrent list access issue. If I wrap the list in 
a new array list before iterating, it works:

final List<DataObject> oldObjects
   = new ArrayList<DataObject>((List<DataObject>) 
object.readProperty(name));


So it's not a Cayenne issue; sorry for the noise.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


Mime
View raw message