openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: StoreManager flush
Date Tue, 02 Nov 2010 21:45:13 GMT
On Tue, Nov 2, 2010 at 3:51 PM, Rick Curtis <curtisr7@gmail.com> wrote:

> > I'm implementing my own StoreManager.
> Do you mind me asking why you are implementing your own StoreManager?
>
> > How can identify relationships (onetoone/onetomany/embedded) within these
> state managers.
> You'll want to look at the MetaData(OpenJPAStateManager.getMetaData()) for
> each StateManager.
>
> > Is there anything special about how the state managers are ordered in the
> collection?
> I can't tell you off the top of my head... maybe someone else can help?


By default the state managers are stored in a hash set - so the order when
you iterate over them is non deterministic. You can change this by setting
orderDirty=true on the openjpa.updateManager persistence property (OpenJPA
will use a LinkedMap instead of a HashSet).

Something like this should work :
<property name="openjpa.UpdateManager"
value="operation-order(OrderDirty=true)"/>

This is from memory so I might have the case wrong, or some other dumb typo.
The documentation is a little sparse in this area, if you're interested in
the various values here's the
link.<http://openjpa.apache.org/builds/latest/docs/manual/manual.html#openjpa.jdbc.UpdateManager>

Like Rick I'm curious why you're writing your own StoreManager though, but
maybe this will help you get started.

-mike

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