hibernate: create Entity(with annotations) in runtime

前端 未结 2 946
灰色年华
灰色年华 2020-12-30 08:44

Is it possible to create hibernate Entity class(with annotations) during runtime? It should be related with the table that is also added in runtime. It is important that the

2条回答
  •  情书的邮戳
    2020-12-30 09:38

    You don't need to create a POJO entity class and instance at run time. What you need is the Hibernate dynamic models. Please refer to http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html_single/#persistent-classes-dynamicmodels.

提交回复
热议问题