It seems to happen when I have a hierarchy of mappedsuperclasses. I tried to strip down a minimal example to reproduce it.