Closed jewzaam closed 10 years ago
Was thinking about this on the way to work today. The simplest thing I can think to do is make each audit a separate document in a single entity. Maybe it can be configured later. But, since lightblue will be able to talk to RDBMS soon (no date set, but it's being implemented) and there's talk of wanting this data in a relational database internally we can do that later and migrate from the old (data in mongo written by lightblue) later. So I propose:
Originally was thinking audit hook's persistence should be independent of lightblue. The problem is I don't have any RDBMS to store this in right now. So I'd if I write it to mongo for now and move it I'd have to change the audit hook implementation. AND I'd be locking any other users of the hook to this decision and move. I think that's a bad idea and therefore the proposal to use lightblue crud API's and leave the persistence to metadata definition.
NOTE this will not include setting lastUpdatedBy in the audit data. See #5
Once the question here is answered: