# Advice on migrating from 3.0 to 5.6 (later 6.x/7.0)

**URL:** <https://discourse.hibernate.org/t/advice-on-migrating-from-3-0-to-5-6-later-6-x-7-0/10627>\
**Category:** Hibernate ORM\
**Created:** [November 18, 2024, 8:41pm UTC](https://discourse.hibernate.org/t/advice-on-migrating-from-3-0-to-5-6-later-6-x-7-0/10627 "2024-11-18T20:41:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas24](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@thomas24](https://discourse.hibernate.org/u/thomas24)\
**Post date:** [November 18, 2024, 8:41pm UTC](https://discourse.hibernate.org/t/advice-on-migrating-from-3-0-to-5-6-later-6-x-7-0/10627/1 "2024-11-18T20:41:18Z")

</div>

Hi,

I am starting work on migrating from v3.0 and I know hibernate is soon in version 7… and I dont know too much about hibernate technicalities… So I am hoping someone remembers 15-20 year old stuff… Along with a java 8 to 11 migration.

The datamodel is large, but quite simple, with unrelational tables. The xdoclet annotations are simple and mostly: class, table, id and property.

I was first thinking to get rid of the xdoclet/ant task I imported, when migrating to Gradle, and steal the generated mapping files. Then move forward with upgrading hibernate from 3.0 → 3.5, then 4.0, 4.6 (I think it was), then 5.0… (it seems thats where the major migration issues occur (or was that Spring).

Then some questions came to mind:

- Can hbm.xml files be used in 5.6 and 6.x, with approximately the same syntax and meaning as in 3.0, if not pointer to descriptions are valuable.
- Should I start by staying with a mapping file or should I move directly to annotations? which is less error prone in moving all the way to 5.6/6.x/7.0.
- Are the annotations consistent in meaning and use, in large part, from 3.5 to 5.6?
- Are there any major technology issues I should be aware of when moving to 5.6?

Any other thoughts are much appreciated.

Thanks in advance,

Thomas

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [November 19, 2024, 9:26am UTC](https://discourse.hibernate.org/t/advice-on-migrating-from-3-0-to-5-6-later-6-x-7-0/10627/2 "2024-11-19T09:26:55Z")

</div>

At this point, nobody really knows what problems you might encounter. Hibernate ORM 3.0 is just way too old and unmaintained.  
You can still use hbm.xml, and I guess that will also be the easiest transition for you, but maybe you want to start afresh by generating an annotated Java model with hibernate-tools from the database model.

---

<div class="post-metadata">

**Author:** ![thomas24](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@thomas24](https://discourse.hibernate.org/u/thomas24)\
**Post date:** [November 19, 2024, 10:06am UTC](https://discourse.hibernate.org/t/advice-on-migrating-from-3-0-to-5-6-later-6-x-7-0/10627/3 "2024-11-19T10:06:21Z")

</div>

Thank you for very useful information. I have to admit I laughed a bit about “nobody really knows what problems you might encounter”. Its sad, but true.

I will have a look at hibernate-tools, it could make the transition easier. I think I might reuse the hbm.xml files for the first version, so I can migrate the build to a pure Gradle build and then start upgrading hibernate to version 4.0 as a first step.

Thank you, I am sure I will get back with other questions on my way to 6.x/7.x

Thomas
