|Syncing two databases [message #675891]
||Wed, 01 June 2011 20:08
Registered: June 2011
I've been trying to look for an answer for this for a couple of days but can't quite seem to find one (mainly because perhaps I don't know the proper wording so bear with me).
Basically we have a sort of client/server style application but one in which the clients go offline for long periods of time and then need to sync up. So the client or "mobile" databases are JavaDB/Derby and the server database is Oracle. For some tables, the server is the only source that creates records, and for others only the mobile DB's create the records.
I have the sync currently working *almost* perfectly using Eclipslink 2.0, two Persistence Units and only syncing those tables which the two have in common (as there are some tables we don't want sync'd). But where I draw a blank is when it comes to merging deleted entities. That is, on the server side the record has since been removed and when the two sync up I need the mobile DB to realize that "hey, this record has been deleted, I need to delete as well".
I looked into @PrivateOwned, cascade delete, etc but they seem to all work on relationship/Joins within an entity and not on the entity class itself. Maybe I'm missing something, as I'm sure there's a way to do this properly.
Thank you for your time.
Powered by FUDForum
. Page generated in 0.03686 seconds