/** {@inheritDoc} */ public Member resolveMember(AttributeContext attributeContext) { final AbstractManagedType ownerType = attributeContext.getOwnerType(); final Property property = attributeContext.getPropertyMapping(); final Type.PersistenceType persistenceType = ownerType.getPersistenceType(); if (Type.PersistenceType.EMBEDDABLE == persistenceType) { return EMBEDDED_MEMBER_RESOLVER.resolveMember(attributeContext); } else if (Type.PersistenceType.ENTITY == persistenceType || Type.PersistenceType.MAPPED_SUPERCLASS == persistenceType) { final IdentifiableType identifiableType = (IdentifiableType) ownerType; final EntityMetamodel entityMetamodel = getDeclarerEntityMetamodel(identifiableType); final String propertyName = property.getName(); final Integer index = entityMetamodel.getPropertyIndexOrNull(propertyName); if (index == null) { // just like in #determineIdentifierJavaMember , this *should* indicate we have an // IdClass mapping return VIRTUAL_IDENTIFIER_MEMBER_RESOLVER.resolveMember(attributeContext); } else { return entityMetamodel.getTuplizer().getGetter(index).getMember(); } } else { throw new IllegalArgumentException("Unexpected owner type : " + persistenceType); } }