Tag Archives: hibernate

Class cast exception with Hibernate and Javassist / CGILib

If you ever encounter class cast exceptions when explicitly casting Hibernate / JPA Entities to subclasses, say because of an @Inheritance(strategy = InheritanceType.JOINED) type of Entity – you will soon find out that this is basically the dark side of … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Joda DateTime in Hibernate Queries and JPA Entities

If you use JodaTime in a JPA Entity, you’ll need to observe the following things: 1) Your Entity member should declare the following annotations: @Column(name = “cutoff”) @Type(type=”org.joda.time.contrib.hibernate.PersistentDateTime”) @Getter @Setter private DateTime cutOff; 2) If you want to query that … Continue reading

Posted in Enterprise Java, Uncategorized | Tagged , , | Leave a comment