I am writing some small hibernate examples and the simple @AttributeOverride is 'doing my head in' (as we say in the UK). The code below gives the error
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'boringEntity_boringCode' in 'field list' and I'm pretty sure this is because I'm using the @AttributeOverride wrong so hibernate is using the default name for the FK reference for BoringEntity, which won't work. Take a look:
And the tables are:
Any help appreciated. I don't find the documentation for this tag particularly revealing I'm afraid.
Joined: Oct 06, 2003
Silly me.. I forgot to add
beside the @OneToOne tag.If you don't put @JoinColumn then HB use the default name which is boringEntity_boringCode. No @AssociationOverride required.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Correct usage of @AttributeOverride on embedded class