I like the simplicity of this approach. Makes me think I might be designing
myself to hell with my somewhat convoluted multi-table monstrosity :).
Cheers,
- hugi
On 12. ágú. 2015, at 15:05, Mike Kienenberger mkien...@gmail.com wrote:
On Tue, Aug 11, 2015 at 8:49 PM, Aristedes Maniatis
Hi Ari, sorry for the late replies to those, I had to back out to a different
project for a couple of weeks.
* What is the purpose of TransactionObject?
It’s to serve as a metadata store for the original object. For example
(something I didn’t mention originally) it stores a human readable
For INSERTs, are you planning on storing all of the original values in
TransactionObjectFieldValue
rows?
Yes
- hugi
On Tue, Aug 11, 2015 at 8:49 PM, Aristedes Maniatis a...@maniatis.org wrote:
I'm interested in a different part of the problem you are solving. Other than
the relationship data discuss here, how are you storing the actual changes in
your audit table? Does your problem just require Bob changed
For the last few years while using EOF, I’ve been storing changes in the audit
log as a map serialized to a String NSPropertyList (the NS* world’s equivalent
of JSON). It works fine, but once the log starts to grow, there are performance
implications. This time around I’m going for a three
Interesting. Questions:
* What is the purpose of TransactionObject?
* Is there a performance advantage to TransactionObjectFieldValue with multiple
rows per change event rather than storing larger json serialised set of changes
in one record? I mean, I understand that it allows you to ask what
For INSERTs, are you planning on storing all of the original values in
TransactionObjectFieldValue
rows?
On Wed, Aug 12, 2015 at 4:18 AM, Hugi Thordarson h...@karlmenn.is wrote:
For the last few years while using EOF, I’ve been storing changes in the
audit log as a map serialized to a String
Thanks for the ideas Mike. After a little mulling, I think your idea of
dynamically modeling relationships to the audit table at application startup is
the best one I’ve heard so far. I’m going to take a peek down that road
tomorrow :)
Cheers,
- hugi
On 10. ágú. 2015, at 14:24, Mike
I'm interested in a different part of the problem you are solving. Other than
the relationship data discuss here, how are you storing the actual changes in
your audit table? Does your problem just require Bob changed record 23 or are
you keeping a complete diff of the changes? If the latter,
Not sure if it's clear, but there are two different approaches to your
problem described.
1) You can set a foreign relationship to your audit table and let
Cayenne assign the key at commit. This is probably the easiest
especially if you dynamically create the relationships in java code.
Except
I set up auditing using a different approach in one project many years
ago back in Cayenne 1.1, and I've continued using it up to this point
in 3.x. I generated special setter, addTo, and removeFrom methods as
well as a create method which created the logger object at that point.
To get the
Hi all.
Is it possible for me to obtain the primary key for a Cayenne DataObject before
committing changes? I’m writing an audit log and I need the key for the object
during PrePersist (where I’m constructing the log object).
Cheers,
- hugi
On 10/08/2015 8:31pm, Hugi Thordarson wrote:
Is it possible for me to obtain the primary key for a Cayenne DataObject
before committing changes? I’m writing an audit log and I need the key for
the object during PrePersist (where I’m constructing the log object).
How will it have a primary
Is it possible for me to obtain the primary key for a Cayenne DataObject
before committing changes? I’m writing an audit log and I need the key for
the object during PrePersist (where I’m constructing the log object).
How will it have a primary key before the record is written to the
Thanks Mike! Although the approach I’m working on is a little different (and
meant to be reusable with any Cayenne installation so can’t depend on
superclass template modifications), it’s very helpful to see code from other
Cayenne folks.
Cheers,
- hugi
// Hugi Thordarson
//
15 matches
Mail list logo