cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RelationshipQuery
Date Wed, 02 Oct 2013 14:50:47 GMT

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
	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  ?


View raw message