Here are the bare-bones of two classes which are related through a
many-to-many relationship:
class SignEntry(SQLObject):
components = RelatedJoin("Component")
class Component(SQLObject):
code = StringCol(default="", unique=True)
sign_entries = RelatedJoin("SignEntry")
With 'se' representing a particular 'SignEntry' object, the code
'se.components' reveals the internals of that object:
[<Component 7 code='48'>, <Component 8 code='24'>, <Component 8
code='24'>]
Now, I wish to remove just one <Component 8 code='24'> from this object,
but 'se.removeComponent(8)' removes both. Is there a (simple) way to
achieve what I wish?
I'm using sqlobject-0.13.0-py2.7 on Windows 7.
Thanks in advance for any advice.
Best regards (and HAPPY NEW YEAR - ALMOST!),
Tim Grove
|