Sunday, March 7, 2010

Generics in Hibernate

Recently, I found one feature from Hibernate that I am missing. I have two identical tables that differs only by foreign keys. Looks like perfect case for generics. Like:

<class name="com.test.GenericClass<Reference>">

But it does not looks like Hibernate supports it. So finally, I had to create empty implementations for my classes. Like:

public class SpecificClass extends GenericClass<Reference>

No comments:

Post a Comment