Re: FK error message mystery

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat Feb 21 2004 - 20:48:53 EST

  • Next message: Andrus Adamchik: "Re: Aqua look-and-feel?"

    > Album ---> * Photo

    I believe we've discussed this before... The relationship
    ("toCoverPhoto/iAmTheCoverPhotoOfTheAlbum" is technically "many-to-one"
    and should be mapped as such until this issue is resolved:
    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-41

    Andrus

    On Feb 21, 2004, at 8:26 PM, Jim Menard wrote:

    > On Feb 21, 2004, at 8:10 PM, I wrote:
    >
    >> When I execute the following code, I see the error below.
    >>
    >> album.setCoverPhoto(photo);
    >> album.getDataContext().commitChanges();
    > [snip]
    >> [v.1.1-dev-2004-2-21 February 21 2004] Some parts of FK are missing
    >> in snapshot.
    >
    > I have read the mailing list archives concerning this error message. I
    > must not be understanding something.
    >
    > Album ---> * Photo
    >
    > One album can contain many photos. In addition, an album may
    > optionally refer to one cover photo. I modeled that as a one-to-one
    > relationship with a "cover_photo" field in the album table that is
    > related to the photo's id. The modeler doesn't let me check "To Dep
    > PK". I assume that's because cover_photo is not the PK of the album
    > table.
    >
    > What do I do? After reading the archives, I still can't figure out
    > what I need to do to make this rather simple relationship work.
    >
    > Jim
    > --
    > Jim Menard, jim..o.com, http://www.io.com/~jimm/
    > "I can picture in my mind a world without war, a world without hate.
    > And
    > I can picture us attacking that world, because they'd never expect it."
    > -- Jack Handey
    >
    >



    This archive was generated by hypermail 2.0.0 : Sat Feb 21 2004 - 20:49:01 EST