to-many relationship after delete

From: Koen Segers (KoenSeger..carlet.be)
Date: Mon Feb 14 2005 - 07:35:41 EST

  • Next message: Cris Daniluk: "RE: 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>



    This archive was generated by hypermail 2.0.0 : Mon Feb 14 2005 - 07:35:55 EST