Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate DAO classes in IntelliJ IDEA

is there any possibilities how to generate DAO classes in IntelliJ IDEA? I found many articles about generating entities but none of how to generate DAO.

I am using 11.1.2 version.

like image 945
user1554427 Avatar asked Nov 03 '22 05:11

user1554427


2 Answers

It should be noted that Intellij does now support this. Follow the guide here:

New Intellij Functionality

like image 118
PeterS Avatar answered Dec 30 '22 14:12

PeterS


IntelliJ IDEA doesn't support it, you can consider using Hibernate Tools instead via Ant:

Ant task: The Hibernate3 tools include a unified Ant task that allows you to run schema generation, mapping generation, or Java code generation as part of your build.


The tools for Hibernate provides various tools to use with Hibernate. The primary tools can be used for generating source artifacts such as mapping files, java entities, DAO and other scaffolding code. The source of this generation can be JDBC database, classes or even just existing mappings.

It uses Hibernate core metamodel to generate from and to the source artifacts. Allowing it to support both top-down, bottom-up and middle-out development.

Hibernate Tools is used in JBoss Tools Hibernate plugins to provide parts of the Eclipse plugins for Hibernate.

like image 44
CrazyCoder Avatar answered Dec 30 '22 12:12

CrazyCoder