Hi all,
I have a one-to-one and many-to-one relationship (with an association table
in the middle; Report.author-assoctable-Person.reports; why the table in
the middle, you might ask, well it's a long story) and i am setting the
author on a specific Report twice to the same value. This gives the
following error:
InvalidRequestError: Can't attach instance <person at
0x36a9350>; another instance with key (<class
'models.data.classes.person'>, (2,)) is already present in this session.
The first time i set the author, it works and if i change the author it
works as well.
This seems i little strange to me, why not be able to set the attribute to
the same value twice?
Otherwise i have to check whether the new and old values are equal (which
through the peculiarties of my code is somewhat wastefull)
Cheers, Lars
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.