我有一个名为 abc.json 的 GEOJSON 文件
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-8.5,
40.9
]
},
"properties": {
"parameters": {
"id": "1",
"name": "Jethalal",
"employeeId": "Jethalal",
"category": "account"
}
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-9.1,
41.5
]
},
"properties": {
"parameters": {
"id": "2",
"name": "Atmaram",
"employeeId": "Atmaram",
"category": "sales"
}
}
}
]
}
我想知道是否存在ORM来处理GEOJSON文件中的大数据。
示例 - 我想将“类别”字段更新为“购买”Jethalal。我将调用一个更新方法。
Feature feature = jsonRepository.findById(1);
feature.setCategory("purchase");
jsonRepository.save(feature);
我的文件看起来像这样
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-8.5,
40.9
]
},
"properties": {
"parameters": {
"id": "1",
"name": "Jethalal",
"employeeId": "Jethalal",
"category": "purchase"
}
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-9.1,
41.5
]
},
"properties": {
"parameters": {
"id": "2",
"name": "Atmaram",
"employeeId": "Atmaram",
"category": "sales"
}
}
}
]
}
我知道类似的图书馆
您可以使用Hibernate动态更新来更新JSON字段。这是参考。
https://vladmihalcea.com/hibernate-dynamic-update-json-properties/