Same objects duplicated in the result [Was Cayenne Examples (data migration tool)]

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Apr 02 2003 - 00:51:00 EST

  • Next message: Troy McKinnon: "questions on compound keys"

    Troy,

    First, we have a few mailing list rules (some of them may not be all
    that explicit, but all of them are common sense...). This is for us to
    organize a more efficient and targeted discussion.

    1. Post Cayenne questions on cayenne-user, unless you are submitting a
    patch or discuss things otherwise related to the development of
    Cayenne, as opposed to an application using Cayenne. Your question is
    clearly more appropriate for cayenne-user (so I am transferring this
    thread to cayenne-user).

    2. Post only to one list (whichever is most appropriate), don't cross
    post (we have an exception - release announcements, but this is
    probably the only one).

    3. Do not post in a thread that is not related to your question, rather
    start a new one with a new subject. "Cayenne Examples" thread was
    about creating examples for the new release, which is clearly quiet
    different from what you are asking.

    Now answering your question. This has been recently discussed:

       http://objectstyle.org/cayenne/lists/cayenne-user/2003/03/0052.html

    Basically all your DbEntities must have primary key column(s) defined
    in the data map. Just check an appropriate "PK" checkbox in the
    "Attributes" tab of each DbEntity. It is partially a modeler fault,
    since it does not give a warning on save (I just checked - it doesn't).
    I will file this as a modeler bug, but this shouldn't prevent you from
    doing it manually.

    Hope this helps ;)
    Andrus

    On Wednesday, April 2, 2003, at 12:08 AM, Troy McKinnon wrote:

    > We are performing a select query:
    >
    > Expression exp = ExpressionFactory.noMatchExp("sku", null);
    > SelectQuery query = new SelectQuery(DszStaging.class, exp);
    > query.setLoggingLevel(Level.WARN);
    > query.setDistinct(true);
    > List items = ctxt.performQuery(query);
    >
    > The result object is populated with the same value for every list item
    > (row). We debugged the app and found that the result set was properly
    > mapped
    > after the select was executed, but when returning the results from the
    > observer, the result set had the same value for every list item.
    >
    > Troy McKinnon
    >
    >
    >
    > ----- Original Message -----
    > From: "Andrus Adamchik" <andru..bjectstyle.org>
    > To: <cayenne-deve..bjectstyle.org>
    > Sent: Tuesday, April 01, 2003 9:00 PM
    > Subject: Re: Cayenne Examples (data migration tool)
    >
    >
    >>
    >> On Monday, March 31, 2003, at 11:22 AM, Andrus Adamchik wrote:
    >>
    >>>> I still need a patch for efficient offline
    >>>> processing (attached), so here's the deal:
    >>>>
    >>>> you integrate that feature,
    >>>> I provide the example+documenation :-)
    >>>
    >>> That's a good deal. I will look at this patch in a few days.
    >>
    >> Just checked in the patch. It went in unchanged except for moving
    >> PrefetchHelper to access.util and replacing a few recently deprecated
    >> method calls.
    >>
    >> Thanks Arndt!
    >>
    >> Andrus
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Apr 02 2003 - 00:55:35 EST