0

I am a beginner to hibernate and want to generate orm pojo of the table for hibernate in Intellij idea 15. there is a good solution provided in IntelliJ IDEA 10 generate entity (POJO) from DB model. but I can't find where is Generate Persistence Mapping window in Intellij idea 15.

this is my screenshot, where is Generate Persistence Mapping? Anyone can help me, thank you very much.

Community
  • 1
  • 1
sachin
  • 25
  • 6

1 Answers1

1

On my IJ14 it's a pop-up menu item, as it also seems to be explained in the link where you've got the idea from.

Try right-clicking the tutorial item in the tree from the Persistence tool window, then at the bottom (or somewhere) you should see Generate persistence mapping:

Generate persistence mapping

Morfic
  • 15,178
  • 3
  • 51
  • 61
  • thank you very much, this solved my question. I can't find the `Generate Persistence Mapping` because the the screen is not height enough. – sachin Jul 06 '16 at 01:20
  • after generate the entity code successfully, `catalog = "" ` show error in `@Table(name = "*******", schema = "*****", catalog = "")` upon every entity class, the error info is `Cannot resolve catalog '', This inspection controls whether the Persistence ORM annotations are checked against configured Datasource` – sachin Jul 06 '16 at 03:30
  • @sachin In order to make IJ validate the annotations against the alreay present DB structure, you need to [add a database connection/data source](https://www.jetbrains.com/help/idea/2016.1/managing-data-sources.html) from the database too-window, and [assign it to the persistence unit](https://www.jetbrains.com/help/idea/2016.1/associating-data-sources-with-session-factories-and-persistence-units.html) with the same popup-menu from the gif above, see second item. – Morfic Jul 06 '16 at 08:41