openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Use of AbstractLRSProxyCollection
Date Wed, 03 Aug 2011 16:10:56 GMT
> 1. If the fetch size property is set to -1, should LRS collections be used
in the first place?
No. Per the manual -- "The fetch size defaults to -1, meaning all results
will be instantiated immediately on query execution. A value of 0 means to
use the JDBC driver's default batch size. Thus to enable large result set
handling, you must set this property to 0 or to a positive number. "

> 3. How do you properly create an AbstractLRSProxyCollection.  The state
manager will only return an instance of
org.apache.openjpa.util.ProxyCollection.  How do you create an instance of
AbstractLRSProxyCollection that is properly attached to its state manager,
e.g., in the case of a child collection annotated with @OneToMany?
Unfortunately I don't have a very good answer for you. I can say that since
the only concrete implementation of AbstractLRSProxyCollection is
LRSProxyCollection, which is in openjpa-jdbc, you're probably going to have
to implement your own... I assume that is the case since Cassandra isn't a
JDBC store, so you guys probably don't(shouldn't) have a dependency on that
module.

I don't know of any active OpenJPA members that are experts in this area....
with any luck you'll become the new expert. :)

On Wed, Aug 3, 2011 at 9:27 AM, Patrick Julien <pjulien@gmail.com> wrote:

> Ah OK, I missed the part about @LRS and and it must be a "collection or
> map"
>
>
>
> On Wed, Aug 3, 2011 at 10:23 AM, Rick Curtis <curtisr7@gmail.com> wrote:
> > I'm not sure if you have done so yet, but please take a read through the
> > docs to see if this helps clear things up for you.
> >
> >
> http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_dbsetup_lrs
> >
> http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_scos_proxy_lrs
> >
> >> 2. AbstractLRSProxyCollection is a Set<T>, but it's not a List<T>,
is
> > there an equivalent LRS object for lists?
> > No, I don't believe there is a list implementation.
> >
> > On Tue, Aug 2, 2011 at 5:53 PM, Patrick Julien <pjulien@gmail.com>
> wrote:
> >
> >> I am trying to get the OpenJPA Cassandra plugin to play nice with
> >> collections and stumbled upon  AbstractLRSProxyCollection or should I
> >> say, when it should be used.  The ticket for your reference is here if
> >> you wish to read it:
> >>
> >> https://github.com/riptano/hector-jpa/issues/11
> >>
> >> Here are a few questions I have:
> >>
> >> 1. If the fetch size property is set to -1, should LRS collections be
> >> used in the first place?
> >>
> >> 2. AbstractLRSProxyCollection is a Set<T>, but it's not a List<T>,
is
> >> there an equivalent LRS object for lists?
> >>
> >> 3. How do you properly create an AbstractLRSProxyCollection.  The
> >> state manager will only return an instance of
> >> org.apache.openjpa.util.ProxyCollection.  How do you create an
> >> instance of AbstractLRSProxyCollection that is properly attached to
> >> its state manager, e.g., in the case of a child collection annotated
> >> with @OneToMany?
> >>
> >> I see there's a setOwner() in that class, but that can't be enough can't
> >> it?
> >>
> >> thanking you in advance for any information you may provide.
> >>
> >
> >
> >
> > --
> > *Rick Curtis*
> >
>



-- 
*Rick Curtis*

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