Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with equalsbuilder and hibernate

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone mentioned a problem with Hibernate and EqualsBuilder from a few years ago. Does anyone know what the problem is and if it is still an issue?

I think this might be the issue per google. But I'm not clear on why it is a problem - you can specify the columns to use in EqualsBuilder. Not sure though.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That makes sense. Because of the automatic calling of getters/setters in EqualsBuilder it ends up doing an infinite loop. So the real problem here isn't necessarily Hibernate, but the combination with equalsbuilder.

Personally, I believe this is something would need to be fixed in equalsbuilder.

There is a problem similar to this with Hibernate and Groovy combination.

Anyway, that link had a solution for you to do where you just override that in your child class and will probably be the only fix.

All conjecture on my part.

Mark
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic