Removing a List of objects from a table

Can I remove a List of objects from a Table at once?
Normally I would remove an object by using Manager.Remove(object), but what if I would like to remove a List? Can I do that in one call? Something like Manager.Remove(objectlist)

There is no such option, you have to remove each object in list individually:


for Object in ObjectList do
  Manager.Remove(Object);

Is there a way to mimic a delete query through Aurelius, to remove a bunch of records at once, or do I have to do that with SQL-queries for each different database?

There is no such way, unfortunately, mainly because the related objects must be also deleted according to the cascade-delete mapping, and also the associated objects in Aurelius manager must be removed as well.

Really?
I have an object in a main table and many many records in another table. Up to 10.000
I want to delete all records who are dependent from my object

Is there no way to do this quicker? I think this is a k.o. criterium to use aurelius (for this purpose)

This is a simply "delete from my_table where ForeignKey = ID"

Is there a better method? I generate temporary lists for clients to work with.  It is used in reporting and it store lists temporarly.

temporarily

You can simply execute the SQL directly:

"delete from my_table where ForeignKey = ID"
Is there a problem that approach?

Also, if you created your database yourself, and the database is defined to have a CASCADE delete, you can delete the master detail and the database server will take care of deleting the rest.

Finally, we are working right now in a TMS Aurelius update which will allow batch updates. That will make it much faster to execute many individual DELETE statements, so in some situations a Remove object by object might be fast enough.

Ok, thank you.