This bug still exists in Hibernate 4.2.6.Final and this ticket was created almost 8 years ago. I was using bidirectional OneToOne mapping and "mappedBy". It is easy to reproduce, it fails even on JPA example mapping from OneToOne class JavaDoc.
Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79) at org.hibernate.exception.JDBCException...
This message was sent by Atlassian JIRA (v6.1-OD-09-WN#6144-sha1:62dfc48)