且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在休眠中动态添加实体?

更新时间:2022-03-04 08:57:21

您可以尝试收集所需的数据以构建模型,并为每个实体生成一个休眠的hbm.xml文件(是xml格式,易于使用Java生成)读取您在更新中描述的所需数据后

You can try to collect the needed data to build the model and generate a hibernate hbm.xml file for each entity (is xml format and easy to generate with java after reading the data needed as you describe in your update)

之后,您可以按照我认为通过这种方法,如果我对您的问题很了解,就能实现您想要的目标.

I Think with that approach you can achieve what you want if I understand well your question.