Hello,

I have several objects from a relation that I'd like to delete. To me,  
this would be a natural syntax:

session.delete(office.users)

to delete all of the "user" objects. I get this error when doing this:

     raise exc.UnmappedInstanceError(instance)
sqlalchemy.orm.exc.UnmappedInstanceError: Class  
'sqlalchemy.orm.collections.InstrumentedList' is not mapped

Took me a while to figure out that delete() didn't work like that. I  
use this instead:

[session.delete(x) for x in office.users]

Can session.delete() be made to work as above (or at the very least  
produce a better error message)?

Cheers,
Demitri


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to