Hello,
I have question regarding recording of document changes and implementing
history support in GAE.
About document changes:
In my case I have a Contract entity which is represented by several
other entities (Customer, Address, ContractDetails and etc) and I want
my application to record all user activities that are performed over
this Contract, i.e record a new history item when some user has changed
something in an existing Contract.
Currently GAE is supporting List<String> to be recorded for each entity
and my first idea was to using of List<String> in the Contract to record
user changes. The problem with this approach is that it holds which user
has changed the document, but not the time of the change.
My other thought was using of List<ChangeItem> where ChangeItem contains
Date changeTime and String userName but I'm not so sure that this
approach is so effective, due the fact that this will cause document
entity to increase in size and will slow down the retrieve operations
over it.
One other option was using of different entity group (ChangeItem with a
key to the Document entity) but the problem is that the app engine
doesn't allow transactions to be performed over more then one entity
groups.
About History support (i.e recording entity changes):
My idea regarding such support was the creation of new record in the
database after each entity change. I'll write some lines to explain for
what I'm talking about.
Lets say that we have a Contract entity into the database, that is
containing the following properties:
Contract-> contractNumber, issueDate, createDate, endDate (nullable
field that should be set to the current date when contract is updated,
i.e to mark the row as a history item)
The problem with this approach is that the creation of a new contract
and updating of existing one cannot be performed in a single transaction.
Does any one has some idea how to handle any of this in a proper way ?
Regards,
Miroslav
--
You received this message because you are subscribed to the Google Groups "Google
App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.