In Cayenne there are a few generic approaches to filter objects
in-memory or as a part of a query. However in your particular case
(reading object based on PK), there is a much simpler solution -
DataObjectUtils.objectForPK(..) :
http://objectstyle.org/cayenne/userguide/dataobjects/
dataobjectutils.html
Hope this helps
Andrus
On Sep 24, 2004, at 8:47 PM, kalpesh modi wrote:
> Hello Everyone,
> I just started using Cayenne and found it really very
> cool.
> I am stuck on one problem.
> I have a to-many relationship
> Class(student_id=fk)-->Student(student_id,student_ssn=pk).
> It returns a list of Student domain objects. I want to
> update Student but only a particular one. I want to
> filter the list based on a part of composite key i.e.
> based on the student_ssn key so that I get only the
> particular Student domain object that needs to be
> updated.
>
> Any pointers/help???
> Thanks,
This archive was generated by hypermail 2.0.0 : Fri Sep 24 2004 - 22:42:48 EDT