HI All,
 
I'm working on my first SQL Alchemy project.  I'm thinking I'm going to 
define a commit method for all the objects I want persist, I'm thinking 
something like:
 
    def commit(self):
        session = Session() #Session is a global sessionmaker
        session.add(self)
        session.commit()
        session.close()
 
Is that a good practice?
 
Thank you for the advice :)
 
~Victor

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to