]
Hardy Ferentschik commented on METAGEN-81:
------------------------------------------
Awesome, thanks for the Jira and pull request. Looking into it asap...
@Embeddable entities don't inherit the access type if it comes
from the hierarchy of the containing class
---------------------------------------------------------------------------------------------------------
Key: METAGEN-81
URL:
https://hibernate.onjira.com/browse/METAGEN-81
Project: Hibernate Metamodel Generator
Issue Type: Bug
Components: processor
Affects Versions: 1.1.1.Final, 1.2.0.Final
Environment: Hibernate 4.1.1, PostgreSQL 9.1
Reporter: Guillaume Smet
Assignee: Hardy Ferentschik
Fix For: 1.x
This is a followup from my post on the mailing list: we have @OneToOne relations on an
@Embeddable object and they aren't present in the metamodel class generated for the
@Embedded object.
After a couple of hours of debugging/digging, I came to the conclusion that this is due
to a missing updateEmbeddableAccessType() call in
TypeUtils.determineAccessTypeForHierarchy(): if the containing class doesn't contain
any information for the access type, the hierarchy of the containing class is scanned for
access type information. Due to this missing call, in this specific case, the access type
is not propagated to the @Embeddable entity via the @Embedded link. If by any chance, your
@OneToOne annotations are on the methods in your @Embeddable entities, they are taken into
account as it's the default access type. If they are positioned on the fields, they
are ignored even if your @Id annotation is positioned on a field in the hierarchy.
Pull request with a test case and the patch to follow.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: