The invention relates to the technical field of object relation mapping, in particular to a dynamic object relation mapping method. The method comprises the following steps: S1, defining entities and relationships according to
a domain model, and converting the entities and relationships into
metadata; s2, the dynamic ORM framework analyzes the
metadata to generate DDL statements and executes the DDL statements; s3, the transmission value is converted into memory and
database type values, and the dynamic ORM maps the operation command of the domain object into an
SQL statement and executes the
SQL statement; s4, constructing a query expression tree, mapping the query expression tree into an
SQL expression model by the dynamic ORM, and generating an SQL statement; and S5, executing the SQL statement to obtain a
result set, and converting the
result set back to the domain entity. According to the dynamic ORM technology, through
metadata description, dynamic analysis and cache storage, real-time updating of the
domain model, automatic generation and execution of DDL statements and synchronization and automatic management of a
database structure are achieved, low-code direct definition and management of the
domain model are supported, complex codes do not need to be written, and the
demand response speed and development efficiency are improved.