The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

256375 (2) [Avatar] Offline
#1
From the book, it states

Let's override the SQL statement Hibernate uses when loading the Item#images collection. This is
a collection of embeddable components mapped with @ElementCollection; the procedure is the
same for collections of basic types or many-valued entity associations
(@OneToMany or @ManyToMany):


But, @OneToMany throws NullPointerExceptions. It appears that this has been an issue for all of Hibernate 3 and 4. Is this fixed in Hibernate 5?

Could you provide a working example?