cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <>
Subject Re: Inserting records without querying the relations
Date Wed, 13 Jul 2016 13:07:21 GMT
You can expose the fk directly as an attribute / property of the class and
set it. Then if you don't need it going forward you can remove it and just
use the relationship.
On Wed, Jul 13, 2016 at 8:04 AM Harunobu Oyama <> wrote:

> Hi,
> Does Cayenne provide a way to insert records without querying the records
> that the new record refers via its FKs? For example, in
> Artist-Painting-Gallery sample in the official getting started guide, is it
> possible to insert Painting records without querying Artist or Gallery when
> ARTIST_ID and GALLERY_ID are already known and we do are certain that they
> are valid? I do not care even if the object created gets unstable as long
> as inserting the record succeeds, as it is a part of process to just insert
> records. We will discard the object without referring any of its member
> once the insertion completes.
> As a part of performance testing, I am in the middle of populating 3
> billions of records on a table with FKs. What is the fastest Cayenne way to
> populate records in such situation?
> thank you,
> nobu

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message