I believe it has something to do with the following, which appears that the property-ref is the uniqueKeyPropertyName for the EmbeddedComponentType.... Is this accurate? If so, does that mean that EmbeddedComponentTypes can't be batch-loaded?
Code:
ManyToOneType.java
private void scheduleBatchLoad(Serializable id, SessionImplementor session)
throws MappingException {
if (uniqueKeyPropertyName==null) { //cannot batch fetch by unique key
EntityPersister persister = session.getFactory()
.getEntityPersister( getAssociatedEntityName() );
EntityKey entityKey = new EntityKey( id, persister, session.getEntityMode() );
session.getPersistenceContext()
.getBatchFetchQueue()
.addBatchLoadableEntityKey( entityKey );
}
}