facebook

Generated POJO’s with UserType class declaration wrong

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

    Steve Prior
    Member

    MyEclipse 5.0 GA incorrectly generated POJO objects with the wrong class for members with custom UserType’s – they get generated as class CustomUserType instead of the final Custom type.

    As an example I’ll say I have class CurrencyUserType which implements UserType, Serializable and defines a custom type Currency. If I change the Foo.hbm.xml mapping file for a class with a <typedef name=”Currency” class=”CurrencyUserType” and then set the type of a member currency of Foo to Currency”, then if I generate the POJO using MyEclipse->Generate POJO’s, then the resulting POJO class gets created with a member currency defined as class CurrencyUserType instead of the correct class Currency.

    I’m pretty sure that MyEclipse 4.1 handled this correctly and that 5 not doing so is regression breakage.

    #259848 Reply

    Brian Fernandes
    Moderator

    sprior,

    Thanks for the detailed explaination. This is a known issue and we will try to get it fixed in the upcoming 5.0.3 maintanence release, I’ll try to increase the priority since you are the 2nd user to report it.

    I’m pretty sure that MyEclipse 4.1 handled this correctly and that 5 not doing so is regression breakage.

    MyEclipse 4.1 did not include a Generate POJOs feature, the only generation that was possible was reverse engineering directly from the databse. I believe we introduced this either in 4.1.1 or in the 5.0 milestone stage at which time it was unfortunately broken in exactly the same way it is now.

    Sorry for the inconvenience caused,
    Best,
    Brian.

    #261827 Reply

    Please bump the priority up even further, as 5.1 just came out, this is still broken, and I guess I’m the third person to report it.
    Thanks,
    Stephen

    #262010 Reply

    Brian Fernandes
    Moderator

    Stephen,

    We made a few critical changes to related code in 5.1 which raised the risk barrier on this fix. The results so far have been positive, so this will certainly be addressed in whatever release follows this.

    I apologize again for the inconvenience,
    Brian.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Generated POJO’s with UserType class declaration wrong

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