PostGIS和JPA 2.0 [英] PostGIS and JPA 2.0
问题描述
我想用PostA和JPA 2.0映射数据类型。我搜索了解决方案或示例,但我能找到的是JPA不支持自定义数据类型的映射。在JPA 2.0中它仍然是这样吗?有没有人给一个例子提示?
I'd like to map datatypes from PostGIS with JPA 2.0. I googled for solutions or examples, but all I can find is that JPA does not support mapping of custom data types. Is it still like this in JPA 2.0? Has anybody a hint for an example?
推荐答案
我搜索了解决方案或示例,但所有我可以找到的是,JPA不支持自定义数据类型的映射。它仍然在JPA 2.0中吗?
I googled for solutions or examples, but all I can find is, that JPA does not support mapping of custom data types. Is it still in JPA 2.0?
是的。所以你必须依赖特定的扩展。对于Hibernate, Hibernate Spatial 项目提供了随时可用的空间方言和自定义类型:
Yes. So you'll have to rely on specific extensions. For Hibernate, the Hibernate Spatial project provides ready to use spatial dialects and custom types:
Hibernate Spatial是Hibernate用于处理
地理数据的通用
扩展。 Hibernate Spatial是
开源和许可,如
Hibernate,在LGPL许可下。
Hibernate Spatial is a generic extension to Hibernate for handling geographic data. Hibernate Spatial is open source and licensed, like Hibernate, under the LGPL license.
Hibernate Spatial允许你交易
标准化
方式的地理数据。它抽象了数据库支持
地理数据的
特定方式,并为地理数据存储和查询
函数提供
标准化,跨数据库接口
。
Hibernate Spatial allows you to deal with geographic data in a standardized way. It abstracts away from the specific way your database supports geographic data, and provides a standardized, cross-database interface to geographic data storage and query functions.
Hibernate Spatial支持OGC Simple Feature
规范的大部分
函数。支持的数据库
是:Oracle 10g / 11g,
Postgresql / Postgis,Microsoft SQL
服务器和MySQL。
Hibernate Spatial supports most of the functions of the OGC Simple Feature Specification. Supported databases are: Oracle 10g/11g, Postgresql/Postgis, Microsoft SQL Server and MySQL.
这篇关于PostGIS和JPA 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!