Relationship across DataDomains (again)

From: Todd O'Bryan (
Date: Wed Sep 08 2004 - 20:48:12 EDT

  • Next message: Andrus Adamchik: "Re: Relationship across DataDomains (again)"

    After a weekend of illness, too much time spent creating interesting
    problem sets for my intro to programming classes, grading a
    horrendously written quiz that took waaaaay too much time to grade, and
    generally not getting to do any real coding of my own, I'm finally back
    to the problem I mentioned a while ago.

    I stuck methods in my classes to handle the relationships the modeler
    didn't create, but I seem to have missed something. Here's the
    exception with the first few objects in the stack trace:

    Unable to invoke method postNewMessage on$Enhance_1..ef658[ShowThread]:
    Can't find relationship: poster

    Here are (what I think are) the relevant parts of and, the two DataDomain descriptors:

            <db-relationship name="poster" source="message" target="user"
                    <db-attribute-pair source="poster_id" target="id"/>

            <db-relationship name="messages" source="user" target="message"
                    <db-attribute-pair source="id" target="poster_id"/>

    And the relevant code that I put in

            public static final String POSTER_PROPERTY = "poster";
         public void setPoster(org.dupontmanual.cayenne.users.User poster) {
             setToOneTarget("poster", poster, true);

         public org.dupontmanual.cayenne.users.User getPoster() {

    Anything jump out that I'm doing wrong?

    Thanks, especially after such a long time to forget about the original

    This archive was generated by hypermail 2.0.0 : Wed Sep 08 2004 - 20:48:16 EDT