facebook

Use Reverse Engineering to put JPA Annotations on fields?

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #302806 Reply

    Thomas True
    Participant

    I am using MyEclipse 7.5 and am using EclipseLink to do some JPA work with an Oracle database. Is there any way to get the reverse-engineer process to put annotations on the fields of a class rather than on the properties? Currently, the annotations are put on the “get” methods. I prefer the other style.

    Thanks.

    Tom True

    #302933 Reply

    Brian Fernandes
    Moderator

    Tom,

    Currently there is no way to do this in MyEclipse. I have filed an enhancement request for this, but cannot provide a time line detailing when this feature will be available.

    Sorry for the inconvenience caused.

    #303123 Reply

    gthieme
    Member

    I need to be able to do the same thing (annotations on the fields instead of the getters).

    The reason I want to do this is because I don’t want Hibernate to use the setters whenever data is read from the database. In my case this would cause data to be changed on a read.

    This would be a useful feature. Maybe you could use the Hibernate Reverse Engineering tool, then scrub the output .java file (by move the annotations from getters methods to the field variables).

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Use Reverse Engineering to put JPA Annotations on fields?

You must be logged in to post in the forum log in