public static CollectionPersister createCollectionPersister(Configuration cfg, Collection model, CacheConcurrencyStrategy cache, SessionFactoryImplementor factory)
throws HibernateException {
Class persisterClass = model.getCollectionPersisterClass();
if(persisterClass==null) { // default behavior
return model.isOneToMany() ?
(CollectionPersister) new OneToManyPersister(model, cache, cfg, factory) :
(CollectionPersister) new BasicCollectionPersister(model, cache, cfg, factory);
}
else {
return create(persisterClass, cfg, model, cache, factory);
}