Re: Select Query on Table with no Primary Key

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jun 07 2007 - 06:32:49 EDT

  • Next message: Andrus Adamchik: "Re: Select Query on Table with no Primary Key"

    > I'm kind of curious if Cayenne supports PK-less for read-only data
    > now, though. Seems to me that could be a useful thing.

    It doesn't - otherwise you won't be able to build a valid ObjectId
    and hence - ensure uniqueness across the context.

    The only way we can potentially support it is by supporting
    "disconnected" objects, i.e. objects that are fetched from DB, but
    not registered in the ObjectContext. Such objects will only be
    marginally more useful than DataRows though. (IIRC JPA supports
    disconnected objects, produced in some other unrelated scenarios).

    Andrus

    On Jun 6, 2007, at 7:42 PM, Michael Gentry wrote:
    > It's not a hijacking. It is interesting to point out that JPA does
    > not
    > support tables without PKs -- I really should learn more about JPA
    > soon. I
    > can understand why, too (need to know what to update and how to
    > make joins,
    > etc). I'm kind of curious if Cayenne supports PK-less for read-
    > only data
    > now, though. Seems to me that could be a useful thing.
    >
    > /dev/mrg
    >
    >
    > On 6/6/07, Craig L Russell <Craig.Russel..un.com> wrote:
    >>
    >> I don't want to hijack this thread, but just point out that JPA does
    >> not support tables without primary key; JDO does (including updates)
    >> as an optional feature.
    >>
    >> Craig
    >>
    >>



    This archive was generated by hypermail 2.0.0 : Thu Jun 07 2007 - 06:33:13 EDT