facebook

Template question $pojo.getToStringPropertiesIterator()

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

    UDC
    Member

    In the pojotostring template, I see the code-

    $pojo.getToStringPropertiesIterator()

    How can I set which properties are in the string properties iterator? I would like to have a to string method in my generated classes, but currently it just puts the hashcode, which is not very useful.

    Also, what type is $pojo? Is there an API somewhere I can see for what properties would be available in my template? I would like to customize the templates, but am not sure what options are available.

    Thanks.

    #256409 Reply

    Riyad Kalla
    Member

    I’ve asked a developer to follow up with you.

    #261591 Reply

    ext9awd
    Member

    sorry for reviving the old thread… I’m really interested in the answer to this. Can you post it here?
    Thanks.

    #261836 Reply

    From the Hibernate.org documentation, you can include properties in the toString using this meta attribute:
    <meta attribute=”use-in-tostring”>true</meta>

    I use this all the time, and MyEclipse honors it.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Template question $pojo.getToStringPropertiesIterator()

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