Kevin Horn wrote:
> Wouldn't you need to do something like:
> 
> newobject = NewObject(....)
> session.save(newobject) # associates the object with the session
> session.flush() # sends the data to the DB
> 
> or does TG have some "magic" that handles the session.flush() automatically?
> 
> I'm afraid I haven't used SA that much yet...
> 
> Kevin Horn

I spend some time and T` on IRC helped me get it all squared away. My 
method now looks like this and it works. Much nicer/prettier than it 
originally was.

     @staticmethod
     def load_quote():
         q = Quotes()
         q.project = 'testing'
         q.flush()

So from the best I can tell, the .save() is auto handled 
somewhere/somehow and I have just have to do the flush() manually 
whenever I want to commit the change.

Rick

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to