I'm really having a hard time getting a DB design to work with Hibernate. I have several kinds of composite keys and some IDs as well, but nearly anything that could be considered exotic. The latest strangeness of Hibernate producing an error on the native query:
Hibernate chokes with an error that appears to be completely unrelated (there's only a multi-column many-to-one association in PlayerStats):
If the entity is mapped with a many-to-one to another entity it is required to also return this when performing the native query, otherwise a database specific "column not found" error will occur. The additional columns will automatically be returned when using the * notation...
Well, this is nice to know, but how do you avoid this error?