hibernate通用代码将任何db导出到* .sql文件 [英] hibernate generic code to export any db to *.sql file
问题描述
我正在尝试制作通用代码。可以通过任何代码调用,并且会备份
后端数据库。
我不想用
1)jdbc类型。 1-4个驱动程序。
2)hibernate个人表class.to使它通用。
我可以得到表模式和pk, fk all。
我还有hibernate表和列别名。但是不能
表示成功。From< table>
查询哪个。可以给我完整的
列值作为字符串数组的列表,将其返回列表保存到该表对象。
(但我不想使用表定义。
并且还没有给出给出该表对象的外键列值
哪个是自然的。
我没有在网络中的hibernate中找到任何代码可以将任何数据库导出到sql
只需要使用hibernate db凭证。
请帮忙。
可以找到你所需的JAVA代码 [ HERE ]。
注意: - 我还没有测试过这段代码,因此不确定它的正确性,但你可以肯定。
问候,
Sudhakar
Hi,
I am trying to make a generic code that. Can be called by any code,and will take a backup
Of the backend DB.
I don't want to used
1) jdbc type. 1-4 drivers.
2)hibernate individual table class.to make it generic.
I can get the table schema and pk,fk all.
I also got hibernate table and column alias name.but not able to
Form a successfull."From <table>"
query which. Can give me the full
Column value as list of string array,insted its returning list of that table object.
(but i don't want to use table definition.
And also it is not giving the foreign key column value insted giving that table object
Which is natural.
I didn't found any code in hibernate in net that can export any db to sql
By just taking hibernate db credential.
Please help.解决方案JAVA code required by you can be found [HERE].
Note :- I have not tested this code and hence not sure about its correctness however you can get an idea for sure.
Regards,
Sudhakar
这篇关于hibernate通用代码将任何db导出到* .sql文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!