Answer the question
In order to leave comments, you need to log in
When to do ORM mapping?
Hello.
I'm starting to write a new program for myself, and decided to get acquainted with ORM (Pony orm)
Tell me, did I understand correctly that you need to do mapping every time you start the program in order to work with ORM objects?
Answer the question
In order to leave comments, you need to log in
In your application, you describe storage objects as OOP classes. Further, when working with these objects in Python, the ORM system translates object interactions into SQL in accordance with the specified provider.
For example, print(Person[person_id].name) will generate the following SQL for SQLite:
SELECT "id", "name", "age"
FROM "Person"
WHERE "id" = ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question