Sunday, September 19, 2010

How buggy is your JPA provider ;) ? (episode 1)

My Colleague, Marcin Lewandowski has found the bug reported by me today to the Hibernate team - see: http://opensource.atlassian.com/projects/hibernate/browse/JPA-6

Very shortly - this bug bites ;) when you try to use @ManyToOne mapping with target entity using Single Table inheritance type - in this case Hibernate (3.4.0 GA) generates SQL which doesn't use the discriminator in the where clause, which in turn causes beautiful exception when processing the query results.

Both OpenJPA, and Eclipselink are generating correct SQL queries - for the details see the Hibernate bugtracker.

No comments:

Post a Comment