[hibernate-dev] HBM migration suggestions

Steve Ebersole steve at hibernate.org
Tue Oct 11 19:44:59 EDT 2016


With obvious disclaimers, ofc! :)

https://github.com/sebersole/hibernate-core/tree/jandex-binding is the
branch

The specific "converter" is
https://github.com/sebersole/hibernate-core/blob/jandex-binding/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/HbmXmlTransformer.java

The plan for this in 7.0 is to be available at runtime as well as at
build-time via Gradle/Ant/Maven plugins.  But for now you'd have to call
that HbmXmlTransformer yourself.

On Tue, Oct 11, 2016 at 6:27 PM Noel Diaz <zerg2k at yahoo.com> wrote:

> This is great Steve. Can I take at least a sneak-peek into the tool?
>
>
>
> On Monday, October 10, 2016 9:56 AM, Steve Ebersole <steve at hibernate.org>
> wrote:
>
>
> Do you have a tool to convert from orm.xml to annotations?  The reason I
> ask is that we are pretty far along in the development of a hbm.xml ->
> orm.xml tool, with the caveat that the orm.xml is an "extended" form of the
> JPA orm.xml weaving in Hibernate-specifics.  So it would depend on whether
> any hbm-specific features are used (property-ref being the biggest problem).
>
> That tool with be completed as part of 7.0, but like I said it is already
> pretty far along.
>
>
> On Mon, Oct 10, 2016 at 8:27 AM Sanne Grinovero <sanne at hibernate.org>
> wrote:
>
> I remember needing something like that and did it by having the legacy
> app create the schema in the RDBMs, then use reverse engineering to
> pojos. This was during the "Seam 2 era" so quite some time ago.. not
> sure how tools evolved since then.
>
> You'll need some manual tuning during both steps of course, but since
> I could tune & extend both the naming strategies (via code extensions)
> and the template files we got a quite complex application (600+
> entities) converted in a couple of days.  AFAIR my best learner lesson
> was to be ready to repeat it all (script it) multiple times, to prefer
> tune the templates and naming strategies iteratively over fixing
> things by hand.
>
>
>
> On 10 October 2016 at 12:58, Max Rydahl Andersen <manderse at redhat.com>
> wrote:
> > hibernate tools can do it for the basic cases - but it haven't been
> > updated in a long while, but you can customise the templates if you find
> > issues.
> >
> > /max
> >
> >> Hi guys,
> >> We have 200-ish hbm files we would like to convert to annotated
> >> classes. Is there any tool you guys recommend to tackle such a project
> >> ?
> >>
> >> Thanks in advance for your time,
> >>
> >> Noel
> >>
> >> _______________________________________________
> >> hibernate-dev mailing list
> >> hibernate-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> >
> > /max
> > http://about.me/maxandersen
>
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
>
>


More information about the hibernate-dev mailing list