Re: filtering to-many relationship list

From: Andrus Adamchik (
Date: Fri Sep 24 2004 - 22:42:41 EDT

  • Next message: Steve Wells: "Re: Deploy to Resin throws config error"

    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(..) :

    Hope this helps

    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