[PonyORM-list] Cannot save cyclic chain

Goldberg, Arthur P arthur.p.goldberg at mssm.edu
Sun Nov 2 16:57:30 UTC 2014


Hi Folks

I'm building an alias dbms. Multiple aliases can refer to the same person (genetics subject). I've two main entities: ID, an identifier; and an EquivalentIDset, which points to a set of aliased IDs. EquivalentIDset needs to be a separate entity, so it can have attributes. One of those attributes is canonicalID, the primary ID (if any) among the set.

However, when I set canonicalID and scan through the IDs, I get a 'Cannot save cyclic chain' exception. Here's an (almost) freestanding extract of my code that generates the error:



What does the exception mean?

What's the best way to handle this? My thought is to not define canonicalID as an entity reference, but as a string equal to ID.identifier. But that would lose the dbms consistency benefits. Suggestions?

Thanks
Arthur

PS:
$ pip show pony
---
Name: pony
Version: 0.5.4
Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20141102/2d499c20/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyclicQ.py
Type: text/x-python-script
Size: 1957 bytes
Desc: cyclicQ.py
URL: </ponyorm-list/attachments/20141102/2d499c20/attachment.bin>


More information about the ponyorm-list mailing list