hibernate: create Entity(with annotations) in runtime

前端 未结 2 951
灰色年华
灰色年华 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:32

    In This scenario, you might want to create the Hibernate Session Factory programatic on the run time , passing in the new mapping that you have created , have a look at http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/session-configuration.html#configuration-programmatic for details .

提交回复
热议问题