final PersistentClass persistentClass = mappings.next();
final Class entityClass = persistentClass.getMappedClass();
ValueEncoderFactory factory = new ValueEncoderFactory() {
public ValueEncoder create(Class type) {
return new HibernateEntityValueEncoder(entityClass, persistentClass, session, typeCoercer);
}
};
configuration.add(entityClass, factory);
}