Buggy code:
@ Entity @ Table ( name = "products" ) @ NamedQueries ( { @ NamedQuery ( name = "Product.findAll" , query = "SELECT<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Product<seq2seq4repair_space>p" ) , @ NamedQuery ( name = "Product.findByName" , query = "Select<seq2seq4repair_space>p<seq2seq4repair_space>FROM<seq2seq4repair_space>Product<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.name<seq2seq4repair_space>LIKE<seq2seq4repair_space>:nm" ) , @ NamedQuery ( name = "Product.delete" , query = "DELETE<seq2seq4repair_space>FROM<seq2seq4repair_space>Product<seq2seq4repair_space>p<seq2seq4repair_space>WHERE<seq2seq4repair_space>p.id<seq2seq4repair_space>=<seq2seq4repair_space>:id" ) } ) public class Product { @ GeneratedValue ( strategy = GenerationType . IDENTITY ) private int id ; private String name ; private String subtitle ; private String producer ; private String appellation ; private String grapeVariety ; private Integer year ; private String colour ; private String taste ; private int bottleSize ; private float price ; private float alcohol ; private Float oldPrice ; private int stock ; private int discount ; private String prizesWon ; private String thumb ; private String description ; private String tasteNotes ; private Image image ; @ Id @ Column ( name = "id" , nullable = false , insertable = true , updatable = true ) public int getId ( ) { } public void setId ( int id ) { } @ Basic @ Column ( name = "name" , nullable = false , insertable = true , updatable = true , length = 255 ) public String getName ( ) { } public void setName ( String name ) { } @ Basic @ Column ( name = "subtitle" , nullable = false , insertable = true , updatable = true , length = 500 ) public String getSubtitle ( ) { } public void setSubtitle ( String subtitle ) { } @ Basic @ Column ( name = "producer" , nullable = false , insertable = true , updatable = true , length = 50 ) public String getProducer ( ) { } public void setProducer ( String producer ) { } @ Basic @ Column ( name = "appellation" , nullable = false , insertable = true , updatable = true , length = 50 ) public String getAppellation ( ) { } public void setAppellation ( String appellation ) { } @ Basic @ Column ( name = "grapeVariety" , nullable = true , insertable = true , updatable = true , length = 100 ) public String getGrapeVariety ( ) { } public void setGrapeVariety ( String grapeVariety ) { } @ Basic @ Column ( name = "year" , nullable = true , insertable = true , updatable = true ) public Integer getYear ( ) { } public void setYear ( Integer year ) { } @ Basic @ Column ( name = "colour" , nullable = false , insertable = true , updatable = true , length = 50 ) public String getColour ( ) { } public void setColour ( String colour ) { } @ Basic @ Column ( name = "taste" , nullable = true , insertable = true , updatable = true , length = 255 ) public String getTaste ( ) { } public void setTaste ( String taste ) { } @ Basic @ Column ( name = "bottleSize" , nullable = false , insertable = true , updatable = true ) public int getBottleSize ( ) { } public void setBottleSize ( int bottleSize ) { } @ Basic @ Column ( name = "alcohol" , nullable = false , insertable = true , updatable = true , precision = 0 ) public float getAlcohol ( ) { } public void setAlcohol ( float alcohol ) { } @ Basic @ Column ( name = "price" , nullable = false , insertable = true , updatable = true , precision = 0 ) public float getPrice ( ) { } public void setPrice ( float price ) { } @ Basic @ Column ( name = "oldPrice" , nullable = true , insertable = true , updatable = true , precision = 0 ) public Float getOldPrice ( ) { } public void setOldPrice ( Float oldPrice ) { } @ Basic @ Column ( name = "stock" , nullable = false , insertable = true , updatable = true ) public int getStock ( ) { } public void setStock ( int stock ) { } @ Basic @ Column ( name = "discount" , nullable = false , insertable = true , updatable = true ) public int getDiscount ( ) { } public void setDiscount ( int discount ) { } @ Basic @ Column ( name = "prizesWon" , nullable = false , insertable = true , updatable = true , length = 500 ) public String getPrizesWon ( ) { } public void setPrizesWon ( String prizesWon ) { } @ Basic @ Column ( name = "thumb" , nullable = false , insertable = true , updatable = true , length = 100 ) public String getThumb ( ) { } public void setThumb ( String thumb ) { } @ Basic @ Column ( name = "description" , nullable = false , insertable = true , updatable = true , length = 1500 ) public String getDescription ( ) { } public void setDescription ( String description ) { } @ Basic @ Column ( name = "tasteNotes" , nullable = false , insertable = true , updatable = true , length = 700 ) public String getTasteNotes ( ) { } public void setTasteNotes ( String tasteNotes ) { } <START_BUG> @ OneToOne ( targetEntity = Image . class ) <END_BUG> @ JoinColumn ( name = "imageId" , referencedColumnName = "id" ) public Image getImage ( ) { return image ; } public void setImage ( Image image ) { } @ Override public String toString ( ) { } }

Fix:
@ OneToOne ( cascade = CascadeType . ALL , targetEntity = Image . class )