Is there a efficient way to update entities without manually setting every field ? In repositories we update fields the following way:
Copy code
Entity[id].apply {
updatedField = "test123"
}
But this is a bit tedious if the objects are very large and/or contain lists. Is there a method that detects the changes between two objects (the entity object and an updated version of the object) and updates the entity accordingly?
b
Bogdan
02/07/2022, 3:25 PM
Exposed
has its own checks, the main thing is that the correct
equals
are defined
Bogdan
02/07/2022, 3:28 PM
i.e. you should just set the values. Alas, there is no automatic mapping. You can look at the libraries