You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classCard(rom.Model):
# ...# in a chain of related objectsnext_card=rom.OneToOne('Card', on_delete='restrict')
prev_card=rom.OneToOne('Card', on_delete='restrict')
once an instance is created with non-zero next/prev links, cannot load the instance anymore
hits RecursionError: maximum recursion depth exceeded while calling a Python object
If you use a ManyToOne and a OneToMany, with proper column reference on
your OneToMany to the other field, this should work.
I'll try to test in January when I'm at a computer.
On Wed, May 11, 2022, 8:14 AM doc-hex ***@***.***> wrote:
class Card(rom.Model):
# ...
# in a chain of related objects
next_card = rom.OneToOne('Card', on_delete='restrict')
prev_card = rom.OneToOne('Card', on_delete='restrict')
- once an instance is created with non-zero next/prev links, cannot
load the instance anymore
- hits RecursionError: maximum recursion depth exceeded while calling
a Python object
- path is:
out[i] = cls(_loading=True, **data)
File "site-packages/rom/model.py", line 259, in __init__
setattr(self, attr, data)
File "site-packages/rom/columns.py", line 339, in __set__
self._init_(obj, *value)
File "site-packages/rom/columns.py", line 329, in _init_
value = self._from_redis(value)
File "site-packages/rom/columns.py", line 798, in _from_redis
return model.get(value)
File "site-packages/rom/model.py", line 568, in get
out[i] = cls(_loading=True, **data)
I am working-around using integer column instead, but wanted to report.
—
Reply to this email directly, view it on GitHub
<#156>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABTDQV7SQPH5IK3K6I53YTVJOXCFANCNFSM5VU4VE2Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
RecursionError: maximum recursion depth exceeded while calling a Python object
I am working-around using integer column instead, but wanted to report.
The text was updated successfully, but these errors were encountered: