Re: to-many relationship after delete

From: Koen Segers (KoenSeger..carlet.be)
Date: Mon Feb 14 2005 - 14:18:04 EST

  • Next message: Tore Halset: "Re: to-many relationship after delete"

    On Monday 14 February 2005 15:23, Cris Daniluk wrote:
    > In the modeler tool, set the "course" relationship "toUsers" Delete Rule to
    > be "Nullify".

    I don't find it.
    Where can you set this option?

    >
    > Still not sure why this isn't a default, but I guess you can get yourself
    > into trouble sometimes if you're not careful with it :)

    ic

    >
    > Cris

    Thx Cris

    >
    > > -----Original Message-----
    > > From: Koen Segers [mailto:KoenSeger..carlet.be]
    > > Sent: Monday, February 14, 2005 7:36 AM
    > > To: cayenne-use..bjectstyle.org
    > > Subject: to-many relationship after delete
    > >
    > > Hi,
    > >
    > > I have a table course that has a Userid in it.
    > >
    > > I can get the list of courses from a specific user. That's nice btw!
    > >
    > > The problem arises when I want to delete a course.
    > > When I delete the course it isn't deleted from the list that
    > > the user has.
    > > I know you can make it happen by removing it from the list of
    > > courses in user, but musn't this be done automaticly?
    > >
    > > Delete operation:
    > > context.deleteObject(course);
    > > // I believe this must be done automaticly...
    > > course.getToUsers().removeFromCourseArray(course);
    > > context.commitChanges();
    > >
    > > Greetz
    > > --
    > >
    > > Koen Segers
    > >
    > > <koenseger..carlet.be>
    > > <http://eddyvite.dyndns.org>

    -- 
    

    Koen Segers

    <koenseger..carlet.be> <http://eddyvite.dyndns.org>



    This archive was generated by hypermail 2.0.0 : Mon Feb 14 2005 - 14:18:18 EST