cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@xsinet.co.za
Subject RelationshipQuery
Date Wed, 02 Oct 2013 14:50:47 GMT
Hi

1.  I have an ObjEntity with a relationship that returns a Map, which I
need to refetch.

public Map<String, ActivityResult> getResults() {
    return (Map<String, ActivityResult>)readProperty(RESULTS_PROPERTY);
}

How do I go about it ?


2.  With a regular relationship that returns a list I used
RelationshipQuery like so:

public List<PatientAllergy> getAllergies()
{
	RelationshipQuery  refreshAlrgy = new RelationshipQuery
	(
		getObjectId(), ALLERGIES_PROPERTY
	);
	return getObjectContext().performQuery( refreshAlrgy );
}

I didn't want any caching on this relationship, hence the above. Not sure
if its the right way of doing this though.

Anyway with reference to question 1. performQuery returns a list, but I
need the Map  ?

Thanks.


Mime
View raw message