I'm trying to get a foothold in Pylons 0.9.7 with SQLAlchemy 0.5, but
running into a problem when testing model functionality.  In
particular, there's a Person object which is supposed to be stored in
the persons table.   Here's test code snippet:

wilma = model.Person('Wilma','Flintstone')
wilma.acct_no = acct_no
wilma.gender = 'F'
print 'New person:',wilma
meta.Session.add(wilma)
meta.Session.commit()

This throws an AttributeError exception.  I don't understand what
ScopedSession is all about and why it has no add attribute.  Just
trying to follow the tutorial without much luck.

Traceback (most recent call last):
  File "test2.py", line 35, in <module>
    meta.Session.add(wilma)
AttributeError: 'ScopedSession' object has no attribute 'add'

This exception refers to the next-to-last line of code.
Can someone please guide me?
Thanks.
Edgar

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

Reply via email to