1

Im asking if there is any way to achive the Jboss hibernate tools reverse engineering generating the annotations on the fields besides the methods (witch comes by default i think). I know that there are two types of AccessType: FIELD and METHOD, in this case, im trying to get the METHOD mode by default with the tool.

I tried to search on the documentation, but i didin't find anything... Hope somone can help me.

A simple example of what i want:

@Column(name = "ACCESS", unique = true, nullable = false)
private String access;

A simple example of what i get:

@Column(name = "ACCESS", unique = true, nullable = false)
public String getAccess() {
    return access;
}
GBS
  • 124
  • 1
  • 3
  • 16
  • Have you checked the tool settings under `Source -> Generate Hibernate/JPA annotations`? – manish Apr 09 '18 at 08:33
  • Thanks for answer @manish im using Hibernate Code Generations Configurations, like this: [link](https://www.mkyong.com/hibernate/how-to-generate-code-with-hibernate-tools/) i don't know where i should search for `Source -> Generate Hibernate/JPA annotations` – GBS Apr 09 '18 at 09:17
  • `Source` refers to the Eclipse `Source` menu. – manish Apr 09 '18 at 10:00
  • @manish yes, i have the `Preferred location of Annotations` with value `Fields`, but i think that this setting is only for eclipse, not for the generation of hibernate tools... Im already working on a legacy project that have the annotations on fields... i cannot change the `Preferred location of Annotations` without changing all the other hibernate objects... wich are much much more... So thats why im asking if there is any way to achive hibernate tools to give the hibernate objects but with the `AccessType` to `FIELD`. Thanks for answering. – GBS Apr 09 '18 at 10:24

0 Answers0