Comments (3)
This is the expected behavior for to_dict(). The default implementation doesn't guard against recursion. By default it will try to serialize all ORM columns and relationships to the detriment of infinite recursion. Since alchy can't really know when the user wants the serialization to stop, it's on the user to override this when needed.
from alchy.
Feel free to close then... this just surprised me.
And thanks for Alchy... has come in very handy for separating SQLAlchemy models from Flask-SQLAlchemy.
from alchy.
You may also want to check out sqlservice (sort of the next generation of alchy). It's currently not as feature rich as alchy but it does a few things differently that may be useful to you.
from alchy.
Related Issues (17)
- [bug] Incorrect reference to `model` module in `Manager` class
- Rename search config class attributes in ModelBase
- Add upsert() HOT 1
- Integrate ORM events into ModelBase HOT 2
- Migrate docs to sphinx and host on readthedocs.org HOT 1
- Add Python3 support
- Add ModelBase configuration option to force strict update by default HOT 1
- Consider implementing convention that certain model fields would be ignored when calling default to_dict(). HOT 2
- Add __getitem__ and __setitem__ proxies to getattr() and setattr() in ModelBase HOT 1
- Add iteritems() method to ModelBase HOT 1
- How to handle database restarts HOT 6
- Pep8 project renamed to pycodestyle HOT 2
- recursive loop HOT 3
- How to support reflect with a dict of table names and database views HOT 6
- Will flask-sqlalchemy 3.0 make alchy unnecessary? HOT 2
- Improper handling of session API HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alchy.