Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 1622 invoked from network); 16 Mar 2011 14:07:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Mar 2011 14:07:16 -0000 Received: (qmail 59551 invoked by uid 500); 16 Mar 2011 14:07:15 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 59520 invoked by uid 500); 16 Mar 2011 14:07:15 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 59512 invoked by uid 99); 16 Mar 2011 14:07:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2011 14:07:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.d.dick@gmail.com designates 209.85.213.46 as permitted sender) Received: from [209.85.213.46] (HELO mail-yw0-f46.google.com) (209.85.213.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2011 14:07:11 +0000 Received: by ywj3 with SMTP id 3so771455ywj.33 for ; Wed, 16 Mar 2011 07:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=F2M7hIiXk5xqBI8INbfcApJA+RIhCJRmuMSnB2b2qFo=; b=I11KaNQc1pJ+RPBNqw+Hq2XZ1bGSAtTnTyoKQn2Sj8++F/+58UG89nebQ2a5HE39im SEJER6NvidIrMxuZYMMJWBZZbOmxa/T/2pw1hxa0/vy+46tdhd7/+7YjbfWATOh9jMpD x6m+sCrtzdNBVWHKUXI9G2PKpc1XVPE6CP20s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=rMRlyp0m9I9fR+y8j2NXXHU9qThbqHHrqdN/ms9ma0fxY/rKwsb1vdaNN3V5lheaSm IEReHG71BDV3hr2FEZsNl0LPTXP2Yl6XtZQWJ1xYQRHQUfNlQb3r+Ph8EOuDpSNBLmHc hgWjI5puiZJCL0ecCUir0r1djqCI+n0gXI/XE= Received: by 10.90.1.3 with SMTP id 3mr123053aga.119.1300284410381; Wed, 16 Mar 2011 07:06:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.113.14 with HTTP; Wed, 16 Mar 2011 07:06:30 -0700 (PDT) In-Reply-To: <1300245341.31052.1284.camel@greenlantern> References: <1300245341.31052.1284.camel@greenlantern> From: Michael Dick Date: Wed, 16 Mar 2011 09:06:30 -0500 Message-ID: Subject: Re: Help with Collection Proxies To: dev@openjpa.apache.org, todd@spidertracks.com Content-Type: multipart/alternative; boundary=00163630fc35634510049e9a0ed8 --00163630fc35634510049e9a0ed8 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Mar 15, 2011 at 10:15 PM, Todd Nine wrote: > Hi guys, > I have a few questions regarding large sets and ordering and could use > some help from the developers. > > > First, everything in Cassandra needs to be write ordering. I must have > the properties of the values that have changed on write in order to > correctly build our indexes to support the "OrderBy" annotation > properly. If I were to define an annotation such as this > > @OrderBy("following.firstName, following.lastName") I'm not entirely sure where you were going with this, but here goes. The OrderBy annotation is used to order the elements of a collection when an entity is loaded from the database. If you're using the OpenJPA internals to get a list of changed attributes they may also follow that order, but I think that would be a 'happy coincidence' and not something you can rely upon. I haven't looked into this in any depth (at least not recently), but I think you'd want to start by looking at the OperationOrderUpdateManagerand ConstraintUpdateManager. > Are there are core API's that exist I can use to pass an object and > retrieve the value? I've had a look at the MetaDataRepository, but I'm > unsure how to go about getting the values loaded when the case is a > nested object such as above. > The MetaDataRepository contains data about the entity (how it's fields map to the database, column names, etc.). To access the values of a particular entity instance you'll probably want to start with its StateManager. Second, we're doing very little when we create our own store > configuration. > > > https://github.com/riptano/hector-jpa/blob/master/src/main/java/com/datastax/hectorjpa/store/CassandraStoreConfiguration.java > > By default, will all collections/maps get wrapped in a Proxy instance > once it's been attached to the EM? We have the potential for huge > collections, so they must be proxies after the initial save and we need > to be sure that we wrap the collection in a proxy. Any guidance would > be greatly appreciated. All second class objects (collections, Date/Timestamps, etc.) are wrappered with Proxy classes for better state tracking. The proxies are inserted at persist time in OpenJPA 2.0 (it's slightly different in earlier versions). Would you need your own proxy? Or are you just interested in ensuring we insert an OpenJPA proxy? Hope this helps, -mike --00163630fc35634510049e9a0ed8--