I use specific custom SQL functions for chemistry purpose, like a chemistry cartridge for MySQL (mychem).
My users give me a first field (text 'molfile') through a regular form, in a text area and I compute other fields (blob 'obserialized') on the fly when inserting.
My SQL statement looks like :
INSERT INTO `bin_structures` (`id`,`obserialized`)
VALUES (`mol_id`, MOLECULE_TO_SERIALIZEDOBMOL(`molfile`));
short for the exemple.
Is there a way (beforeSave callback?) to add 'obserialized' field and MOLECULE_TO_SERIALIZEDOBMOL(molfile)
value to the SQL statement or am I on the wrong way with a callback?