Automatic updating of entities in Java code with the database first approach


Is there a framework or library that can automatically create and update the client view of the DB model? I.e., when I change the schema in the DB (for example, if I manually added a new table in the DB or a new field in the table, or created a new relationship between the tables), the Java view of the DB model was automatically updated (at the development stage), so that I do not create or change entities in the Java code manually.

Author: Merlin, 2020-12-17

1 answers

You need to dig towards plugins for your development environment. Whether you can find something suitable will depend both on the environment itself (Idea has an advantage here, but it is paid), and on the database used. Not every database has plugins for building models.

It usually looks like this:

Plugin for creating a model based on a database table

I immediately admit that I personally did not find a suitable plug-in for myself and I saw the models with my hands.

To the account update, do not go overboard. I would like to find it to generate, so it's not a problem to update it (to generate it again - it's done for half a minute).

 1
Author: Владимир Карсанов, 2020-12-17 19:43:48