Harish Vishwanath wrote: > Hello All, > > I found this : > > #s is a session object > #Director is a class > >>>> s.query(Director).filter(Director.name == 'Dir30').delete() > 2009-06-01 16:17:00,750 INFO sqlalchemy.engine.base.Engine.0x...9a10 > SELECT > director.id AS director_id > FROM director > WHERE director.name = ? > 2009-06-01 16:17:00,796 INFO sqlalchemy.engine.base.Engine.0x...9a10 > ['Dir30'] > 2009-06-01 16:17:00,875 INFO sqlalchemy.engine.base.Engine.0x...9a10 > DELETE > FROM director WHERE director.name = ? > 2009-06-01 16:17:00,937 INFO sqlalchemy.engine.base.Engine.0x...9a10 > ['Dir30'] > 1 > > Is there any reason behind for SELECT being issued before a DELETE?
read the docs for query.delete(). http://www.sqlalchemy.org/docs/05/reference/orm/query.html?highlight=query#sqlalchemy.orm.query.Query.delete "fetch" is no longer the default strategy in 0.6 but in 0.5, you definitely need to send through a different setting on this one. > > > Regards, > Harish > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
