Stupid question: How do I make IDEA create hibernate mappings etc?

Hey folks,

I'm probably just overlooking something really really easy to see, but I think I'll just ask before wasting time searching around for what I'm looking to do:

I just want to generate a Hibernate XML mapping in IDEA. I've added the facet, written some bean I'd like to be mapped as an entity -- and the IDEA docs state that it can actually generate the mapping.
But where the heck do I find that option?

I'm a former Eclipse user, switched less than a week ago and so far I'm pleased with the new experience... still gotta get used to it a bit more, but it feels like it's going to be worth the money and time investment :)

Ok, hoping to get help from a seasoned IDEA user now :)

Thanks guys
Denis

2 comments
Comment actions Permalink

Hello Denis,

Hey folks,

I'm probably just overlooking something really really easy to see, but
I think I'll just ask before wasting time searching around for what
I'm looking to do:

I just want to generate a Hibernate XML mapping in IDEA. I've added
the facet, written some bean I'd like to be mapped as an entity -- and
the IDEA docs state that it can actually generate the mapping.

But where the heck do I find that option?

I'm a former Eclipse user, switched less than a week ago and so far
I'm pleased with the new experience... still gotta get used to it a
bit more, but it feels like it's going to be worth the money and time
investment :)

Ok, hoping to get help from a seasoned IDEA user now :)

Thanks guys
Denis


In Project tool window use "View as" combobox to switch to Java EE: structure
view.
There context menu on hibernate facet / Generate persistent mapping / By
*. In dialog specify necessary settings.
As the generation source you need to have some data source with loaded database
metadata. Or some entity beans, but I personally did not try EJB here.

Notice, that IDEA generator assumes that target bean does not exist. If you
already defined it, then some data may be overwritten or vise-versa, not
inserted due to already existent code.

Alexander.


0
Comment actions Permalink

Oh great, thanks, I'd never have found that :)

0

Please sign in to leave a comment.