Working with Hibernate I've seen the following line:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory()
The thing: is I don't see how does configure pass the configuration setup to buildSessionFactory(). I expected it to be something like:
new SessionFactoryBuider.configure().build()
Which would be a builder pattern that I have seen before and I understand (the configure method applies ON SessionFactoryuBuilder). But this patter is like..."reversed".
Aucun commentaire:
Enregistrer un commentaire