It works, thank you, Fernando. :-)
j
Fernando Takai wrote:
Hi,
You can try:
My.query.filter_by(id=id).delete()
(If your object can use the .query syntax)
or
session.query(My).filter_by(id=id).delete()
On Apr 13, 2010 6:12 AM, "jo" <jose.soa...@sferacarta.com
<mailto:jose.soa...@sferacarta.com>> wrote:
Hi all,
I'm trying migrate from 0.3 to 0.6
I don't know how to delete an object
in the old version it was:
My.get(1).delete()
in 0.6:
My.get(1).delete()
AttributeError: 'My' object has no attribute 'delete'
j
--
Jose Soares
Sferacarta Net Via Bazzanese 69
40033 Casalecchio di Reno
Bologna - Italy
Ph +39051591054
fax +390516131537
web:www.sferacarta.com <http://www.sferacarta.com>
Le informazioni contenute nella presente mail ed in ogni eventuale
file allegato sono riservate e, comunque, destinate esclusivamente
alla persona o ente sopraindicati, ai sensi del decreto legislativo
30 giugno 2003, n. 196. La diffusione, distribuzione e/o copiatura
della mail trasmessa, da parte di qualsiasi soggetto diverso dal
destinatario, sono vietate. La correttezza, l’integrità e la
sicurezza della presente mail non possono essere garantite. Se avete
ricevuto questa mail per errore, Vi preghiamo di contattarci
immediatamente e di eliminarla. Grazie.
This communication is intended only for use by the addressee,
pursuant to legislative decree 30 June 2003, n. 196. It may contain
confidential or privileged information. You should not copy or use it
to disclose its contents to any other person. Transmission cannot be
guaranteed to be error-free, complete and secure. If you are not the
intended recipient and receive this communication unintentionally,
please inform us immediately and then delete this message from your
system. Thank you.
--
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
<mailto:sqlalchemy@googlegroups.com>.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com
<mailto:sqlalchemy%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.
--
You received this message because you are subscribed to the Google
Groups "sqlalchemy" group.
To post to this group, send email to sqlalch...@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.
--
Jose Soares
Sferacarta Net
Via Bazzanese 69
40033 Casalecchio di Reno
Bologna - Italy
Ph +39051591054
fax +390516131537
web:www.sferacarta.com
Le informazioni contenute nella presente mail ed in ogni eventuale file
allegato sono riservate e, comunque, destinate esclusivamente alla persona o
ente sopraindicati, ai sensi del decreto legislativo 30 giugno 2003, n. 196. La
diffusione, distribuzione e/o copiatura della mail trasmessa, da parte di
qualsiasi soggetto diverso dal destinatario, sono vietate. La correttezza,
l’integrità e la sicurezza della presente mail non possono essere garantite. Se
avete ricevuto questa mail per errore, Vi preghiamo di contattarci
immediatamente e di eliminarla. Grazie.
This communication is intended only for use by the addressee, pursuant to
legislative decree 30 June 2003, n. 196. It may contain confidential or
privileged information. You should not copy or use it to disclose its contents
to any other person. Transmission cannot be guaranteed to be error-free,
complete and secure. If you are not the intended recipient and receive this
communication unintentionally, please inform us immediately and then delete
this message from your system. Thank you.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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.