Marco Schulze wrote:
Hello JDO team,

we have the following situation, which IMHO Erik is refering to:

We have multiple datastores where each datastore belongs to one organisation (e.g. company). In order for the organisations to do business with each other, they need to exchange data. Thus, all our JDO objects are owned by one datastore and have the organisationID of this datastore as part of their composite PK (we are using exclusively application identity).

Now, say organisation B wants to become a reseller for organisation A concerning their ProductType Mercedes320E. This causes the object graph of the Mercedes320E (including price configuration and a lot of other data) to be copied from datastore A to datastore B. Of course, some of the objects within this graph (e.g. the currency EUR) already exist in datastore B and some don't (e.g. the currency $). The ones that don't exist yet must be added - the ones that are already there need an update.

After this initial copy, the copied object will be updated whenever the object graph is modified in the original datastore. Until now, as well for the initial copying as for the updates, I simply detached my ProductType from datastore A with all the necessary fetch-groups and attached it in datastore B. This was simply adding/overwriting all the data within the object graph and that's basically the behaviour I need.

I hope I could explain the situation well enough.

Best regards,

Marco Schulze
NightLabs GmbH
I just wanted to clarify sth.: Of course every organisation is at the same time publisher of objects (e.g. manufacturer of a product) and subscriber (e.g. reseller). Thus, it is not a master-slave-scenario, but all organisations need to be able to copy data from another organisation defining using certain fetch-groups.

Reply via email to