Re: Relationship caching

2008-04-15 Thread Laurent Marchal
It's a nice solution , i found another too that i missed in the documentation : RelationshipQuery is used by Cayenne internally to fetch object(s) related to a single given object via a mapped ObjRelationship. In some cases the query can be used directly in the application, e.g. if we want to

Re: Relationship caching

2008-04-15 Thread Mike Kienenberger
One way to guarantee it would be to change the code generation so that the getters perform an explicit query. You'll always be sure to get the latest database values, and you won't have to worry about invalidating anything. In Cayenne 1.2 code, it'd look something like this, although there's a bi

Relationship caching

2008-04-15 Thread Laurent Marchal
Hello, i have disabled caching in cayenne with : but when i want to use a flatened relationship like : List userAccessCodes = user.getRelatedAccessCodes(); the SQL request is only made the first time, after cayenne use his cache to return the AccessCode list. The only way i found to