Hi guys,

I'm somewhat confused about the different lifecycle states of objects
that are backed by the SA ORM.

According to the SA docs (FWIW, I'm on 0.4), an object is in the
Persistent state when it is present in the session and has a record in
the database.

So if I do something like this:

p = meta.session.query(model.Pool)
pool = p.get(7)
meta.session.refresh(pool)
InvalidRequestError: Instance 'p...@0xa6aca8c' is not persistent within this 
Session



Working on the theory that I've misunderstood what a Persistent object
is, I try this:

meta.session.save(pool)
InvalidRequestError: Instance 'p...@0xa6aca8c' is already persistent


Now I'm really confused.  What did I do?


-- 
Ross Vandegrift
[email protected]

"If the fight gets hot, the songs get hotter.  If the going gets tough,
the songs get tougher."
        --Woody Guthrie

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

Reply via email to