facebook

hibernate DAO,POJO Generation Transactions, Equals,&&amp

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

    cpalm
    Member

    I have just started working with the Myeclipse5 GA reveng tools for pojo, and DAO generation and have noticed
    that there are no equals or hashmap generated in the POJOs.
    I assume these are supported as they appear in the templates.
    How do I get the pojo generation to include equals and hashmap?

    The second question I had was in regards to the DAO generation. Currently I don’t see any Session.beginTransaction()
    or any transaction references in the DAO’s.

    Is there any support for transactions in the generated DAOs?

    Thanks,
    Chris

    #257478 Reply

    Haris Peco
    Member

    Chris,

    MyEclipse doesn’t support hashCode and equals for now

    If you use spring DAO you can make complete transaction handling in spring config file
    There isn’t support for transaction in base DAO – you can set your transaction handling (it is true for spring too, but spring do it declarative)
    I don’t sure why you want transaction in DAO, but if you want easy transaction handling it is the best that use spring

    Best
    Peco

    #257787 Reply

    I hate to disagree with a moderator, but I’m using the MyEclipse “generate pojo” and having it generate equals and hashcode with no problem.
    I always embedd the following in my <id> or <composite-id>

    
    <meta attribute="use-in-equals">true</meta>
    <meta attribute="use-in-tostring">true</meta>
    

    and that seems to work fine.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: hibernate DAO,POJO Generation Transactions, Equals,&&amp

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