DamienHarper/auditor-bundle

Is it possible to read audit data from two different databases?

MounaBOUZID opened this issue · 2 comments

Hello,

I am using auditor-bundle version 4.0 for my project, I'm thinking about using a second database to store the old audit data so that I keep only audit data for last three months on my actual database, but I don't know if the bundle supports reading from two databases.

Can I have two providers for reading audit data from two databases ?

Or is it possible to create a custom reader to establish connection to my second database such the createQuery() function of the file Reader.php is responsible for the connection to the database (Line 50)?

Quick response will really help me a lot.

Thanks.

@MounaBOUZID Sorry for this very late reply.
What you expect to do is not possible as of now. The storage mapper, which is responsible of choosing the right storage manager (implicitly entity manager), does not make its decision based on data itself but on entity.

I'd be glad to review a PR if you wanna give a try at providing such a feature.

@MounaBOUZID I close this issue for now. Feel free to reopen it if needed.