Mohammed Housseyn Taleb
Mohammed Housseyn Taleb

Reputation: 1828

Is there a way to update the entity classes in jpa automatically?

I started using JPA to manage persistence so as usual I used the wizard and the App Connection to get my JPA entities, then I am creating a "JPA Controller Classes from Entity Classes" wizard to get my DAO.

Everything is fine.

As my question says: I predict that I will need to refactor my database to add some fields in an existing table, should I drop my jpa entity and DAO then? Or there is some mechanism that does the update automatically according to the table changes?

I'm using Netbeans, and I have chosen EclipseLink and JPA2.1.

Thanks.

Upvotes: 1

Views: 592

Answers (1)

Maciej Kowalski
Maciej Kowalski

Reputation: 26522

I used to take advantage of the JPA Modeler plugin some time ago for one of my projects. It does the trick when it comes to updating your jpa entities based on the database tables state.

Here is the link with some video tutorials: jpa-plugin

Upvotes: 2

Related Questions