How to write the flask one-to-many self-reference relationship?

I want to write a system comment, and there will be more responses to one comment, so it"s an one-to-many self-quote. I write it as follows:

Traceback (most recent call last):
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/lushg/awesome/sites-flask/app/api/decorators.py", line 21, in decorated_function
    return f(*args, **kwargs)
  File "/home/lushg/awesome/sites-flask/app/api/posts.py", line 215, in add_comment
    comment = Comment(**params)
  File "<string>", line 4, in __init__
    
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/sqlalchemy/orm/state.py", line 424, in _initialize_instance
    manager.dispatch.init_failure(self, args, kwargs)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 249, in reraise
    raise value
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/sqlalchemy/orm/state.py", line 421, in _initialize_instance
    return manager.original_init(*mixed[1:], **kwargs)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/sqlalchemy/ext/declarative/base.py", line 747, in _declarative_constructor
    setattr(self, k, kwargs[k])
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/sqlalchemy/orm/attributes.py", line 229, in __set__
    instance_dict(instance), value, None)
  File "/home/lushg/awesome/sites-flask/venv/lib/python3.5/site-packages/sqlalchemy/orm/attributes.py", line 1042, in set
    given, wanted))
TypeError: Incompatible collection type: Comment is not list-like
Is there a problem with

writing? (because one-to-many doesn"t want to do it with the third table. )

Nov.27,2021

look up the document and solve it by yourself. it is the wrong way to write remote_side. The correct way to write it is as follows:

  document address  

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b353cb-2b4c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b353cb-2b4c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?