How to create entity based on table name in Spring/Hibernate/Jpa?

Viewed 23

I have a a list of entity class like this:

@Table(name = "steps")
public class Step {

}

DB connection and mapping are already set properly.

And I have the String s(eg, steps), I want to create an entity object of the class that are associated with s table, so that I can save a new record to it. How should I approach this?

0 Answers
Related