Showing posts from July, 2009

Hibernate, EMF objects and eclipse databinding – ensure you have an equals method

Ran into a few problems the other day around creating UI forms with EMF that is backed by Hibernate and Teneo. The jface databinding snippets almost always use strings as the model object, however, most model objects have embedded objects in them that then, down the road, relate back to user-readable strings.  Hence the snippets don’t always show some nuances around the model objects.Its important to realize that some of the jface databinding support classes, such as those producing object-to-label maps (which is why there are always IObservableMaps being used for everything are good in the sense that you can create a map between domain objects and the strings that should be displayed. These can be created automatically for you using jface databinding or you can create the maps directly yourself (no one really does that though). The real issues is to realize that many of these object-to-label maps that are created automatically use a backing map (hashtable) that hashes the object to p…