Milos Zikic - Personal site, sharing thoughts about startups, products and engineering

Seam convertEntity and ValueNot valid solution

There are a few things that You should note when using :

  • Be sure to keep one persistence context throught out the whole form

  • Implement equals and hashcode

  • In equals method be sure not to compare against Class types since the objects are proxified and the classes doesn't comply if You compare it simple as this.getClass().equals(other.getClass())

  • In equals method be sure to always use getters if You are using JPA since the properties in proxy objects are not initialized if You access it directly. So always use: this.getId().equals(other.getId())



And thats about it. Happy converting :)

Share this post