> 
>> I notice that DBIC does a select to find the related rows (i.e. in the
>> Cd table when looking for rows to cascade delete).   Is there a reason
>> that's done instead of just deleting directly?
>> 
>> INSERT INTO artist ( label, name) VALUES ( ?, ? ): '1', 'test aritst'
>> INSERT INTO cd ( artist) VALUES ( ? ): '25'
>> 
>> DELETE FROM artist WHERE ( id = ? ): '25'
>> SELECT me.id <http://me.id>, me.year, me.name <http://me.name>,
>> me.artist FROM cd me WHERE ( me.artist = ? ): '25'
>> DELETE FROM cd WHERE ( id = ? ): '54'
>> 
>> Why not just delete from cd where artist = 25?
>> Again, sure seems like that should be inside a transaction.
> 
> Correct, fix on TODO list.

And shouldn't that be a SELECT ... FOR UPDATE before the delete?
I am still trying to figure this whole transaction/locking/update
stuff out. 

cheers,
moritz


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to