Not sure if this should be considered a bug or not (and maybe it should be considered a hibernate bug, if it is a bug)
Basically if you have a long class name and a long primary id name and you use
without specifying a @JoinColumn, when the EJB3 layer (through hibernate) tries to create the table DB2 will throw an error that the column name is longer then 30 characters. It would be nice if the DB2Dialect or EJB3 (not sure who is creating the database) would be able to realize that for DB2 the column name should be at most 30 characters and try to generate a shorter id.
I also have a question: Is EJB3 or Hibernate using a hash() in my entities? And if yes, what is it using it for?
This should be considered a DB2 bug rather than an EJB3 spec bug.
no Hibernate does not use hashCode() nor equals() but Sets and some other collections do