Hi, if you were to specify that records held details of who initially added them to the database, then the relevent user fields would already be part of the om objects. Although this doesn't help in initially filling them in.
Perhaps you could write a method that you could pass an om object and a user object into and have it fill in the relevent fields for you. One other consideration would be whether you have a single audit table that records the table, column, old and new values, or whether you have an audit table for every table in the system. I guess this would depend on how often updates are made and how often you may want to re-create a record as it was at a previous point in time. Either way, I would be interested in how you solve this as I am likely going to need this at some point. Up to now I have been able to get away with just using a log file to record any changes. Jon -----Original Message----- From: Pugh, Eric [mailto:[EMAIL PROTECTED]] Sent: 13 December 2001 20:00 To: 'Turbine Users List' Subject: How can I get a user's information service? Hi all, I need to tweak my OM objects. I need to intercept any updates to the database and record in an Audit table the old value and the new value. I am planning on tweaking the Velocity Templates to have my save() method in my objects take care of this. However, the harder part about this assignment is that I need to record the username of the user who is updating the database. I don't want to have to pass a username value into my OM objects. I am hopping that my OM objects can access some sort of service statically who will give me the User object... That way I don't have to think about the fact that all my OM objects are storing audit data into the database.... Eric -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> ----------------------------------------------------------------------------------------- DISCLAIMER: This message contains proprietary information some or all of which may be confidential and/or legally privileged. It is for the intended recipient only who may use and apply the information only for the intended purpose. Internet communications are not secure and none of the companies in the British Biotech plc group accepts responsibility for any loss or damage which any person or legal entity may suffer or incur following their reliance on the contents of this message. Any views or opinions presented are only those of the author and not those of British Biotech. If you are not the intended recipient please delete this e-mail and notify the author immediately by calling ++44 (0)1865 748747; do not use, disclose, distribute, copy, print or rely on this e-mail. British Biotech Pharmaceuticals Limited Registered Office: Thames Court, Watlington Road, Oxford, Oxfordshire, OX4 6LY Registered in England and Wales No 1985479 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
