1

I'm thinking of implementing blameable fields to couple of my tables using https://github.com/stof/StofDoctrineExtensionsBundle bundle to know which user created some of database objects.

What I want to achieve and cannot find right answers to do that is following:

As admin user I would like to be able to transfer all blameable objects from one user to another one. This could happen in cases when I want to delete existing user or just want that those objects belongs to another user.

Theoretically I can connect to MySQL.INFORMATION_SCHEMA to find all tables which have fields "createdBy" and deal with those tables, but I cannot connect to that database using doctrine (or can I???).

Can someone suggest approach of transferring all blameable objects to different user?

P.S. I don't need to set default user or to enable null values for createdBy column like answered here: How to disable Blameable-behaviour programmatically in Symfony2

Community
  • 1
  • 1
nbucic
  • 163
  • 1
  • 10
  • I am asking myself similar questions from time to time - and I am more and more convinced that I am going to implement my own metadata factory next to the Doctrine one. – LBA Jan 26 '16 at 10:21
  • @LBA remember me if you'll be implementing your own metadata factory :-) – nbucic Jan 26 '16 at 15:10

0 Answers0