title: Hibernate Cannot add or update a child row issue
body: <p>I have this relationship</p>
  
  <pre><code>@OneToOne(orphanRemoval = true, optional = true, cascade = {CascadeType.ALL},  mappedBy = "publicProcurement", fetch = FetchType.LAZY)
  @Getter
  @Setter
  private Announcement announcement;
  
  
  @OneToOne
  @JoinColumn(name = "public_procurement_id", nullable = false, insertable = false, updatable = false)
  @Getter
  @Setter
  private PublicProcurement publicProcurement;
  </code></pre>
  
  <p>And here my foreign key Constraint </p>
  
  <pre><code> &lt;addForeignKeyConstraint baseColumnNames="public_procurement_id" baseTableName="announcement" constraintName="announcement_public_procurement_ibfk_1" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="public_procurement"/&gt;
  </code></pre>
  
  <p>Now  in my service I do this</p>
  
  <pre><code>@Override
  public void addAnnouncement(final Integer id, final PublicProcurement publicProcurementForm) {
      PublicProcurement publicProcurement = get(id);
      Announcement announcement = publicProcurementForm.getAnnouncement();
      announcement.setApprovedName(userService.getUserName());
      announcement.setPublicProcurement(publicProcurement);
      announcementService.save(announcement);
      publicProcurement.setAnnouncement(announcement);
      save(publicProcurement);
  }
  </code></pre>
  
  <p>But when I save announcementService.save(announcement); I receive below exception</p>
  
  <pre><code>Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`etendering_test`.`announcement`, CONSTRAINT `announcement_public_procurement_ibfk_1` FOREIGN KEY (`public_procurement_id`) REFERENCES `public_procurement` (`id`))
  at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:132) ~[mariadb-java-client-1.1.2.jar:na]
  at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106) ~[mariadb-java-client-1.1.2.jar:na]
  at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(MySQLStatement.java:266) ~[mariadb-java-client-1.1.2.jar:na]
  at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:289) ~[mariadb-java-client-1.1.2.jar:na]
  at org.mariadb.jdbc.MySQLStatement.executeUpdate(MySQLStatement.java:317) ~[mariadb-java-client-1.1.2.jar:na]
  at org.mariadb.jdbc.MySQLPreparedStatement.executeUpdate(MySQLPreparedStatement.java:150) ~[mariadb-java-client-1.1.2.jar:na]
  at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133) ~[hibernate-core-4.2.7.Final.jar:4.2.7.Final]
  </code></pre>
  
  <p>I try everything but I don't know what I´m doing wrong with Hibernate. any idea guys?</p>
  
  <p>Regards.</p>