Hi,
is there any simple way to define another database for a specific DataObject? I know that I can use DB::connect() to create a connection to the other database and this is what I will be doing if I don't find a feature in SilverStripe itself that would do this for me. But then I have to create all the database queries myself - which is not too much of work in this case - but it's certainly more work than what it would be to use the ORM. And I also need to write a table creation query manually.
Thanks for your support! :)
Background: I'm going to implement a feature that allows registered users to upload their own attachments and I don't want them to appear in the assets folder due to security reasons (other members are NOT allowed to be able to see attachments uploaded by others), so storing them in the database makes sense. Also this way I don't have to worry about duplicate filenames in the system. Setting up another database for this is just for keeping the main database light weighted - easier to transfer data between production and development. The databases can reside on the same server and even use the same MySQL user to avoid the hassle with different passwords.