Closed filantus closed 4 years ago
Right now, no.
But I see your use case, you have a soft-relation between fields that can't enforce integrity.
We might have to introduce a new field type that would allow this "emulated fk/m2m" to another model on possibly another DB.
Thank you for answer!
Well, i realize what it can't have native constraints on dababase level, but just hoped for handy abilities (like underscored filters, fetching related objects, etc.) what will do routine work underhood.
Emulated Foreign Key - sounds very good. Eager to try it. When it'll be ready of course.
Thank you for great work!
Hi!
I have two postgres databases and two models sets (in different files). For expample: models.py and models_ext.py
I configure two connections and two apps:
In
models.py
i try to create model with FK to model frommodels_ext.py
:models.py:
models_ext.py:
It is even possible?
Now when i run this i get:
OS: Win10x64
Packages versions: asyncpg==0.20.1 tortoise-orm==0.16.12
Postgres version: 12