Is it possible to patch an entity in Hibernate not on a specific table, but on predefined queries?
Those. let me have a class
class Test { private int Id; private String Name; private String Remark; } and in the database there is a table of such a structure
CREATE TABLE sqls ( `name` VARCHAR, `select` CLOB, `refresh` CLOB, `insert` CLOB `update` CLOB `delete` CLOB ); INSERT INTO sqls ( `name`, `select`, `refresh`, `insert`, `update`, `delete` ) VALUES ( "TEST", "SELECT id, name, remark FROM mytable", "SELECT id, name, remark FROM mytable WHERE id = :id", "INSERT INTO mytable (id, name, remark) VALUES (:id, :name, :remark)", "UPDATE mytable SET name = :name, remark = :remark WHERE id = :id", "DELETE FROM mytable WHERE id = :id" ); and I want my class to work not directly with the table mytable , but through such predefined queries. By itself, requests will not be so simple. There will be both joins and procedure calls for insert / update
If Hibernate does not know how to do this, is there ORMy with this functionality?
ORM is not applicable when you have rules that don't map to the ORM logic.And the last post direct execution of UPDATE without being tied to an entity. - Anton Shchyrov