Is it by design that SilverStripe (4.2 at least) validates a
DataObject when deleting, resulting in a failed deletion if a required field is missing? And if yes, why? 🤔
@rasmniel From memory SS3 did this as well, I think it is just because every form submission calls the attached validator
Basically if you attach a validator to a
form, SS checks the validator before handling the forms action, so at the point the validator is loaded, it is unaware what "action" you want to perform
I inherited a project that has some
mysql_* methods for exporting and importing data (incl. some relations). I guess I should rewrite that with
SQLSelect statements if I cannot transform the queries to use the ORM directly?
thats what i would do
Assuming it's in the same database
I've got one which imports stuff from a different database in a build task... I just wrote some PDO queries for that and used the ORM for the import side
okay all, can I install SS and not define a DB < the usage requires no data to be stored, I just need access to the dataobject classes and some of the manipulation << all objects will be created on the fly and be resident for only the current run
so dev/build might be tricky!
or should I use sqllite as a workaround