Dear ladies and sirs.
My scenario is this. We use NHibernate as our DAL. Each and every object fetched by it, be it a single object, a collection of objects or even child objects - whatever, we have to perform certain post processing.
Currently, this custom post processing is spread around - after each fetch. I am wondering if I could restructure it in a better way. I am thinking along these lines:
- Add custom metadata to the mapping - is it at all possible?
- Register post fetch hooks - I hope it is possible, do not know how to do it.
- Each time the hook method is invoked it will observe the custom attribute in the metadata and perform the custom post processing accordingly.
I really do not know if my scheme is possible. Can anyone provide any hints on it?
Thanks.