openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teodoro Cue <t...@exist.com>
Subject Re: Replication Question
Date Tue, 17 Mar 2009 05:31:55 GMT
Hi,

Thanks for the reply! It took me a while(about a day) testing various
solutions to realize that it must be some sort of a bug.

As long as it builds on Maven, I don't have problems working with bleeding
edge technology. I'll just checkout the source code and update it on a daily
basis. :)

-Teody

On Tue, Mar 17, 2009 at 4:33 AM, Pinaki Poddar <ppoddar@apache.org> wrote:

>
> Hi,
> > A will have its list field contain many instances of class X. When I
> > persist it, the first DB contains the
> > complete number of X instances and the A instance that's holding the
> list.
> > The second DB on the other
> > hand, only contains the A entity without the X entities.
>
> This is a consequence of "collocation constraint" imposed by Slice. When A
> is persisted in slice1, all the related X instances are persisted in slice1
> as well automatically by Slice. If A is the 'root' instance (i.e. the
> explict argument to persist() call) then Slice checks if A is a replicated.
> But it does not check if anything reachable from A i.e. the list of X is
> replicated or not.
>
> This automatic decision can be relaxed and a JIRA issue OPENJPA-981 [1] has
> been created. I hope to fix it shortly. Is it possible for you to work with
> our nightly builds or you also need this change in earlier branches?
>
> [1] https://issues.apache.org/jira/browse/OPENJPA-981
>
>
>
> Teodoro Cue wrote:
> >
> > Hi,
> >
> > I'm using org.apache.openjpa.slice.ReplicationPolicy.Default to replicate
> > all my entities into a backup DB.
> > Here is my class structure with flat inheritance strategy:
> > Interface C
> >
> > @Entity
> > @Replicated
> > Abstract Class AC implements C
> >
> > @Entity
> > @Replicated
> > Class A extends AC
> >     @OneToMany
> >     List<C> list;
> >
> > @Entity
> > @Replicated
> > Class X extends AC
> >
> > During runtime, an instance of class A will have its list field contain
> > many
> > instances of class X. When I persist it, the first DB contains the
> > complete
> > number of X instances and the A instance that's holding the list. The
> > second
> > DB on the other hand, only contains the A entity without the X entities.
> >
> > Am I doing something wrong?
> > By the way, the DB that I'm using is Embedded Derby for testing purposes.
> >
> >
> > -Teody
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Replication-Question-tp2486209p2488312.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>


-- 
Teody
Senior Software Engr | Exist Global | +63 32 412 1155 | YM: exst_tcue |
www.exist.com | Innovation Delivered

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