The org.hibernate.ejb.metamodel.SingularAttributeImpl#isAssociation always returns false, even in case of an association.
Test case:
class Epmloyer {
@ManyToOne
private Department department;
// ...
}
ManagedType<Employer> managedType = entityManager.getMetamodel().managedType(Employer.class);
Attribute<? super Employer, ?> attribute = managedType.getAttribute("department");
assertTrue(attribute instanceof SingularAttribute);
assertTrue(attribute.isAssociation()); // <-- here it fails
|