Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8961005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:47:15+00:00 2026-06-15T15:47:15+00:00

This tool can be found in Netbeans 7.2 when you press ctrl+n on and

  • 0

This tool can be found in Netbeans 7.2 when you press ctrl+n on and choose “Persistance -> Genarate entity classes from Database”. It works great.

I’d like to use it in IntelliJ, because IntelliJ uses something diffrent (option “Generate persistnet mapping -> by database schema” from Persistance tab) to generate entities from schema. Generated classes aren’t useful, because they contains only primitive types

For example:

Part of my schema:

create table users (
  id int not null primary key,
  login varchar(64) not null unique,
  pass char(150) not null
);

create table groups (
  login varchar(64) not null,
  group_name varchar(64) not null,
  foreign key (login) references users (login)
);

Part of entity generated by IntelliJ:

@Entity
public class Users
{

    private Integer id;

    @javax.persistence.Column(name = "id")
    @Id
    public Integer getId()
    {
        return id;
    }

    public void setId(Integer id)
    {
        this.id = id;
    }

    private String login;

    @javax.persistence.Column(name = "login")
    @Basic
    public String getLogin()
    {
        return login;
    }

    public void setLogin(String login)
    {
        this.login = login;
    }

    private String pass;

    @javax.persistence.Column(name = "pass")
    @Basic
    public String getPass()
    {
        return pass;
    }

    public void setPass(String pass)
    {
        this.pass = pass;
    }

    @Override
    public boolean equals(Object o)
    {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Users users = (Users) o;

        if (id != null ? !id.equals(users.id) : users.id != null) return false;
        if (login != null ? !login.equals(users.login) : users.login != null) return false;
        if (pass != null ? !pass.equals(users.pass) : users.pass != null) return false;

        return true;
    }

    @Override
    public int hashCode()
    {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (login != null ? login.hashCode() : 0);
        result = 31 * result + (pass != null ? pass.hashCode() : 0);
        return result;
    }
}

Part of entity generated by NetBeans (the right way I want to use in IntelliJ)

@Entity
@Table(name = "users", catalog = "soccerweb", schema = "public")
@NamedQueries({
    @NamedQuery(name = "Users.findAll", query = "SELECT u FROM Users u"),
    @NamedQuery(name = "Users.findById", query = "SELECT u FROM Users u WHERE u.id = :id"),
    @NamedQuery(name = "Users.findByLogin", query = "SELECT u FROM Users u WHERE u.login = :login"),
    @NamedQuery(name = "Users.findByPass", query = "SELECT u FROM Users u WHERE u.pass = :pass")})
public class Users implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 64)
    @Column(name = "login")
    private String login;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 150)
    @Column(name = "pass")
    private String pass;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "userId", fetch = FetchType.LAZY)
    private List<Achievements> achievementsList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "userId", fetch = FetchType.LAZY)
    private List<BlueTeam> blueTeamList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "userId", fetch = FetchType.LAZY)
    private List<RedTeam> redTeamList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "userId", fetch = FetchType.LAZY)
    private List<TournamentPlayers> tournamentPlayersList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "userId", fetch = FetchType.LAZY)
    private List<Stats> statsList;
    @OneToMany(mappedBy = "userId", fetch = FetchType.LAZY)
    private List<TournamentStats> tournamentStatsList;
    @OneToMany(mappedBy = "userId", fetch = FetchType.LAZY)
    private List<TournamentAchievements> tournamentAchievementsList; 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:47:16+00:00Added an answer on June 15, 2026 at 3:47 pm

    IDEA doesn’t support it yet, I’ve created a new feature request, please vote.

    You may be also interested in the following feature requests:

    • IDEA-64709 JPA: Generate field access
    • IDEA-67051 Create ability to reverse engineer DAO Objects via Hibernate reverse engineering
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is from a sql script. What tool can generate this? Thanks --USE [MY_TABLE]
Is there any tool that can parse/conver xml files to this format? I have
Can i show a Tool tip like this: Also, I want to show this
Is there any tool or method that can speed up this process? For instance
Is there a good tool that can help to reverse engineer Java classes to
I found this post, which seems to be an exact duplicate, but I can't
I recently ran the database repair tool as per this link: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/db-repair-tool At the
Recently I found about this tool easy_install that help me to easy install additional
So I've been writing this tool and I am using these Sockets (not these
I am trying to write sms encryption tool. People using this tool will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.