问题描述
我的应用程序将使用以下技术:
- Postgresql
- Postgis
-
- JPA / Hibernate
- Spring
- Spring数据JPA
我理解(从Hibernate Spatial文档中)必须使用以下方言: 我不明白的是,上面的方言与标准的Posgresql方言有关,即 Postgis方言是标准Posgresql方言的超集吗? 最新的标准Posgresql方言的所有功能都可以用Postgis方言吗? 我猜我可以在同一个entityManager工厂中使用多个/多个方言......那么,什么是最好的方法来获得两种方言的最佳效果? PostgisDialect实际上扩展了Postgresql方言,所以,它是一个超集。请参阅类声明:,这表明您只需要包含Postgis Dialect就可以保留空间和非空间字段。 Postgis主要为Postgresql之上的空间对象提供支持。 Postgis安装还包括提供许多实际几何功能的GEOS(Java拓扑套件的C ++端口),Proj4,它提供对不同坐标系/投影和GDAL的支持,GDAL是各种地理数据格式之间的转换工具。 / p> My application is going to use the following technologies: I understand (from the Hibernate Spatial documentation) that one has to use the following dialect: What I don't understand though is how the above dialect relates to the standard Posgresql dialect, i.e. Is the Postgis dialect a superset of the standard Posgresql dialect? Will all features of the latest standard Posgresql dialect be available in the Postgis dialect? I guess I can't use several/multiple dialects on the same entityManager factory... Then what are the best practices to get the best of both dialects? The PostgisDialect actually extends the Postgresql dialect, so, yes, it is a superset. See the class declaration: PostgisDialect class declaration There is a good tutorial here: Hibernate spatial with Postgis that show that you only need to include the Postgis Dialect in order to persist both spatial and non-spatial fields. Postgis primary provides support for spatial objects on top of Postgresql. A Postgis installation also includes GEOS (a C++ port of Java Topology Suite) which provides many of the actual geometric functions, Proj4, which provides support for different coordinate systems/projections and GDAL, which is a conversion utility between various geographical data formats. 这篇关于PostgisDialect与PostgreSQLDialect或两者兼而有之?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! org.hibernate.spatial.dialect.postgis.PostgisDialect $ c
org.hibernate.dialect。 PostgreSQLDialect
...
org.hibernate.spatial.dialect.postgis.PostgisDialect
org.hibernate.dialect.PostgreSQLDialect
...