Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public String selectUidQuery() {

@Override
public String selectLastVersionByUidQuery(String uid, String timestamp) {
return "SELECT DISTINCT ON (id) id,validTime " +
"FROM " + this.getStoreTableName() + " WHERE (data->>'uid') = '" + uid + "' AND " +
return "SELECT DISTINCT ON (id) id,validTime,parentid " +
"FROM " + this.getStoreTableName() + " WHERE (data->>'uniqueId') = '" + uid + "' AND " +
this.getStoreTableName()+".validTime @> '" + timestamp + "'::timestamp "+
"order by id, lower(validTime) DESC";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public V put(FeatureKey featureKey, V value) {
// TODO: need to implements other subclass of feature
if(featureKey instanceof PostgisFeatureKey) {
var parentId = ((PostgisFeatureKey)featureKey).getParentID();
this.addOrUpdate(featureKey, BigId.fromLong(idScope,parentId), value);
this.addOrUpdate(featureKey, parentId == 0 ? BigId.NONE : BigId.fromLong(idScope,parentId), value);
} else {
this.addOrUpdate(featureKey, null, value);
}
Expand Down
Loading