docs: protected SessionFactory createSessionFactory() {
          // Set up a service registry.
          StandardServiceRegistryBuilder b = new StandardServiceRegistryBuilder();
  
          // configures settings from hibernate.cfg.xml
          ServiceRegistry registry = b.configure().build();
  
          // Build the session factory.
          return new MetadataSources(registry)
                  .buildMetadata()
                  .buildSessionFactory();
      }