.remove() and .contains() not working on your Java set?

If you suddenly experience problems callling set.remove() and set.contains() on your Java Set instances, you might be using Hibernate, which replaces your Set instance with its own version (PersistentSet), which uses a HashSet internally to store your data. For example, the problem I faced was the following: Person.java public class Person(){ String _name; public Person(String […]


Correct naming convention for boolean values in Hibernate mapping files

Ok, this just took me a while to figure out so I thought I’d share it here. If you have a boolean variable that follows the naming convention “isValue” (e.g. boolean isPerson = false;), then the according mapping file property name may not include the “is” part of the name, for example: <property name=”person” column=”is_person” […]

Quickfix: Hibernate integration for ZK applications

If you’re using the awesome ZK framework together with Hibernate you might run into some issues where Hibernate behaves a little funky while the application runs. The trouble’s cause According to the developers of ZK, the reason for this is ZK’s multi-threaded event model. Whenever an event gets fired, a new event thread is created. […]