Hi again.

I have the following definitions:

tests = Table('tests',
    Column('id', Integer, primary_key=True),
    ...
)

tests_state = Table('tests_state',
    Column('id', Integer, ForeignKey('tests.id'), primary_key=True).
    Column('count', Integer, default=0)
)


class TestState(object):
    pass

class Test(object):
    pass


testStateMapper = mapper(TestState, tests_state)
testMapper = mapper(
    Test, tests,
    properties={'state': relation(TestState, uselist=False)}
)



The problem is that when I do:

test = sess.get(Test, 1)
test.state.count = test.state.count + 1

the tests_state table is not updated.



Thanks   Manlio Perillo


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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