When generating tables in intellIj 2016.3, classes are created as follows:
@Entity @Table(name = "mir", schema = "ipm", catalog = "ipm") public class Mir { private long entityId; private Long fileseq; @Id @Column(name = "ENTITY_ID", nullable = false) public long getEntityId() { return entityId; } public void setEntityId(long entityId) { this.entityId = entityId; } @Basic @Column(name = "FILESEQ", nullable = true) public Long getFileseq() { return fileseq; } public void setFileseq(Long fileseq) { this.fileseq = fileseq; } } How do I get the tables to be generated like this:
@Entity @Table(name = "mir", schema = "ipm", catalog = "ipm") public class Mir { @Id @Column(name = "ENTITY_ID", nullable = false) public long ENTITY_ID; @Basic @Column(name = "FILESEQ", nullable = true) public Long FILESEQ; } without getters and setters? (don't ask why)
Is it possible to do something like this? if not, can it be done so that the underscore in the column title is not removed? not getEntityId() , but getEntity_Id() at least?
long getENTITY_ID()- MrFylypenkopublicclass fields, you break one of the principles of OOP, encapsulation. 2. By calling thegetEntity_Id()methods, you are violating the Java convention ( oracle.com/technetwork/java/codeconventions-135099.html ). I am sure that there is a more elegant solution for your task. PS Not in JSON, by chance, mapite toentity_id? :) - ruslanys