Hi,

I bet there is some really stupid detail I'm missing, but here's the
problem I hope somebody can help with...

I updated to the latest SA (0.4.2p3) & Elixir 0.5.0 (making the
appropriate changes for the new defaults) but now the update methods
of controllers won't save any changes.

Data gets stored when creating new objects, but updates to objects
don't... and this happens only in a Pylons (current dev version)
context. If I work in "paster shell" and manually change something,
everything works as expected.

I've tried every combination of flush(), save_or_update(), commit() I
could think of, even tried a few absurd ones just for fun. Even
created a new, empty project and followed Jonathan's instructions on
Pylons + Elixir to the letter to be sure there wasn't something
lurking in my older project.

I tried it with both Postgres and Sqlite3 just to rule out any
problems with the DB. Same thing.

Also, despite calling Session.commit() -- the output from SA with
echo=True doesn't show any UPDATE happening.

Here's the little update method in my test project's controller:

    @validate(schema=PersonForm(), form='edit')
    def update(self, id):
        person = Person.get(id)
        person.__dict__.update(self.form_result)
        person.flush()
        Session.commit()
        redirect_to(url_for(controller='person', action='index',
id=None))

That should work... right?  (the same few lines work for new objects)
So it has to be one of those really simple, obvious, things where I'll
be like "duh, how did I miss THAT?"

Happy weekend,
--Isaac


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

Reply via email to