HHH-9165 hotfix

This is my attempt to fix https://hibernate.atlassian.net/browse/HHH-9165
So far it seems to work with the query I needed it for.

Though it would still be nice if [@AttributeOverride](http://docs.oracle.com/javaee/7/api/javax/persistence/AttributeOverride.html) actually linked a value from the object to a column in the table as the docs and every tutorial I find suggests it should.