<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="hibernate.ogm.datastore.provider">mongodb</property>
<property name="hibernate.ogm.datastore.host">127.0.0.1</property>
<property name="hibernate.ogm.datastore.port">27017</property>
<property name="hibernate.ogm.datastore.database">eatery</property>
<property name="hibernate.ogm.datastore.create_database">true</property>
<mapping class="com.ws.web.models.Reservation" />
</session-factory>
</hibernate-configuration>
有没有人知道为mongodb配置hibernate的锄头。 Docs说不需要方言。但我有错误
Exception in thread "main" org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:104)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:71)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:209)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
at com.ws.web.models.Test.main(Test.java:17)