facebook

Adding toString in Hiberate POJO reverse engineering

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

    I’m using MyEclipse 7.1.1 and I’m learning about the built-in Hibernate capabilities.

    I would like the reverse engineering tools to automatically generate a toString method in the POJO for selected fields in the table.

    I saw in one post (http://www.myeclipseide.com/PNphpBB2-viewtopic-t-13692-highlight-useintostring.html) somebody mentioned using <meta attribute=”use-in-tostring”>true</meta>. I placed this in the hbm.xml file, however, after trying to reverse engineer the table again, this seemed to have no effect.

    Am I going about this the correct way? I know the MyEclipse Persistence Tools can generate the hbm.xml file while reverse engineering a table, but if you disable that feature, will they read an existing hbm.xml file and respect the meta attribute? If not, is there a way I could use either custom templates or a ReverseEngineeringStrategy to achieve this?

    Also, is there any documentation on the available methods used within the custom velocity templates provided by MyEclipse, such as $pojo.needsToString() and $pojo.getToStringPropertiesIterator()?

    Thanks,
    Adam

    #299013 Reply

    Loyal Water
    Member

    Also, is there any documentation on the available methods used within the custom velocity templates provided by MyEclipse, such as $pojo.needsToString() and $pojo.getToStringPropertiesIterator()?

    Im afraid we dont have any such documentation.

    Am I going about this the correct way? I know the MyEclipse Persistence Tools can generate the hbm.xml file while reverse engineering a table, but if you disable that feature, will they read an existing hbm.xml file and respect the meta attribute? If not, is there a way I could use either custom templates or a ReverseEngineeringStrategy to achieve this?

    I have asked the dev team to look into this. They are busy with the 7.5 GA development at the moment but we will get back to you soon.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Adding toString in Hiberate POJO reverse engineering

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