On Tue, Nov 2, 2010 at 3:51 PM, Rick Curtis <[email protected]> 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
