I have a trigger that applies some business logic so I want to refresh the object after it has been saved to pick up any changes the triggers makes. What's the best way of going about this? I did think I could do this but it didn't work.
There is no easy way to do that without destroying the object. This is one of the most request features for Aurelius (object Refresh) and we are looking forward to implement it.
What is I used interfaced objects for my models - would that work so that I could rely on the reference counting of TInterfaceObject to clear up afterwards? Then I could set manager's ownsobjects property to false and not worry about freeing up my model objects?
Unfortunately it's not possible.
So what is the recommended way to refresh an object from database?
If you want to keep the object instance, then there is just not automatic way to do so. You have to load an object, and copy the properties to the existing object. But if you just want to get a new, updated instance of an object (doesn't need to be the same instance) then you can just Clear the object manager and call Find method again.
But this clears all other objects, too, doesn't it?
Yes, unfortunately there is no way to evict a single object from the manager, yet.