Auto generation of Hibernate mapping files
Just wanted to check how most people are generating their Hibernate mapping files and POJOs. I understand I can use Hibernate Tools, but what other options do I h开发者_JAVA百科ave?
Fewer and fewer people are generating mapping files - annotations are now widely adopted.
As for the generation - I've only heard of Hibernate Tools and the hibernate maven plugin
I wrote my own code. It was pretty simple. My database was DB2/400 (legacy with more than 200 fields on certain views) - there was no way I could hand write them. I investigated SYSCOLUMNS system table to check the column name, data type and generated domain classes with annotations. 60 lines of code saved me hours :)
精彩评论