On Apr 7, 2010, at 2:04 AM, Deyan Tsvetanov wrote: > Jacques > PS: I saw your answer to Adrian and your example. Yes this seems to be a real > problem, I can't find a good solution so far :/ If we > could avoid to have NTP sync the machine during transactions it should not be > a problem. I found > http://commons.apache.org/net/api-release/org/apache/commons/net/ntp/TimeInfo.html > But there are maybe other problems you crossed > during your experiment? > > [Deyan] dealing with timestamps is difficult. > > In the end of the day the question is: why do we need created_timestamp_tx > and last_update_tx for all entities / db tables ? > Answer: we need them in order to generate a list of entities ( database > records ) to be pushed / pulled and that list must be in the correct order > so we avoid FK or PK constraint issues.
Actually this is NOT the purpose of the timestamps. The EntitySync stuff does use these to recreate the order as much as possible, but there is no way to solve problems with FKs when you have circular references or something is changed multiple times between syncs. If you're relying on this to solve FK problems you're going to have issues, guaranteed. The dummy-fks feature is what is meant to solve the FK problem. -David
