Search code examples
javajpaintellij-ideamapping

Generate persistance mapping from database schema In IntelliJ15


i'm using IntelliJ 15.0.3,I connect oracle database 10g,then i want to create jpa entity.

open Import Database Schema Dialog,and Choose a table named:CD_AREA_DICT

Import Database Schema Dialog

When Click ok ,I get the error:Cannot generate Mapping xml.

enter image description here

how can i fix this?


Solution

  • You have to select XML mapping file (usually orm.xml) in your project or simply add new one using [+] button. You can also uncheck "Generate Single Mapping XML" and generate entities without creating/updating mapping file.

    To avoid unrecognized mapped types you should probably add JAVA to your project classpath.

    IntelliJ JPA Entity Generation