facebook

Retaining source changes across reverse engineers

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

    DIS
    Member

    I’m using MyEclipse Persistence Tools generated objects in lists displayed in my user interface. I would like to add a toString method so I don’t end up with something like this: com.dis.jpa.Applicationrole@1385eca. Is there something I can enter in my jpa file so that this code will survive the reverse engineering process. Some kind of a ignore begin and end tag?

    #305229 Reply

    DIS,
    Your problem is not clear from your post.
    Can you please list out what exactly you are trying to do?

    #305230 Reply

    DIS
    Member

    Hmm, when i regenerate my java objects based on my db table structures the “MyEclipse Persistence Tools” writes at least two files for each table. TableName.java and TableNameDAO.java. Since some of my tables are in one to many or many to many relationships I get ‘Set’s created for those relationships. I use the objects in these sets in my user interface widgets and they don’t have ‘toString’ methods, so I end up with ugly names. I wish to add ‘toSting’ methods to the “MyEclipse Persistence Tools” generated files but I don’t want the “MyEclipse Persistence Tools” to overwrite the entire file. I would like it if there were some sort of tag I could place in the file that would tell the tool “don’t remove this code” OR “copy this code into the newly generated file. I’m sure there are other reasons to add code to these generated files. I could extend the TableName.java class and add the toString method there but it gets messy when I have to recreate the objects in the ‘sets’.

    #305331 Reply

    DIS
    Member

    This message has not been recovered.

    #305462 Reply

    DIS
    Member

    This message has not been recovered.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Retaining source changes across reverse engineers

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