[ACCEPTED]-Converting from Hibernate hbm.xml to annotations-hibernate

Accepted answer
Score: 11

I don't think so. But you don't have to 6 do it in one go, you can mix annotation 5 and .xml config quite easily.

Also, why do 4 you feel the need to convert to annotations? I 3 wouldn't say they're so much better than 2 xml config to warrant the investment in 1 time to convert them.

Score: 2

Have you looked at hibernate tools - specifically 1 the hbm2java component?

Score: 1

I know this question is rather old, but 8 this may help someone coming from a search 7 engine:

We recently undertook this endeavor 6 in our own fairly large project and wrote 5 a tool that parses hbm.xml-files and generates 4 annotations into Java-files to help us.

You can find it here. It 3 automates a majority of the migration, leaving 2 you to only do the difficult parts. All 1 the easy things are done for you.

More Related questions