Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

Field jsonable field name? #111

Closed Jaymon closed 1 year ago

Jaymon commented 4 years ago

In the addon MagicOrm we have a pk_name method that allows overriding the pk's name (whic is default _id) in the Orm.jsonable() method to something else (the addon changes it to <ORM_NAME>_id.

It would be nice to have better support for this so you could easily change arbitrary names to something different in the jsonable method. You can definitely just override .jsonable() but often times that's a lot of boilerplate to change one value