views:

11

answers:

0

I am attempting to encrypt certain database fields by adding a call to mysql AES_ENCRYPT (and AES_DECRYPT) using Doctrine DQL Hooks.

for SQL SELECT's I have a preDqlSelect() in my Doctrine_Record_Listener class, which goes through each parameter in the select fields, and adds a AES_DECRYPT() for encrypted fields.

But, it looks like calling save() on a doctrine model class only calls the preSave() listener and does not call any of the preDql* listeners.

Can anyone suggest a way of getting this to work or a better way of doing this?

Thanks