× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
JennyNishimura reported 2013-03-04T21:33:39Z  · last modified 2013-07-09T18:34:37Z

ResultSet.getObject error when field is primitive type for one document and sub-document for another document


Dev
Emilian Bold
emilianbold
QA
Sachin Prakash
SachinPrakash
Priority Major
Complexity Unknown
Component MongoSQL
Version 14.0

Insert two documents using the following JSON documents.  Note that the "Irrigated land" field is a string in the first document and it is a sub-document in the second document.

{
    "code": "aa",
    "name": "Aruba",
    "geo": {
        "Location": "Caribbean, island in the Caribbean Sea, north of Venezuela",
        "Geographic coordinates": {
            "N": {
                "deg": 12,
                "min": 30
            },
            "W": {
                "deg": 69,
                "min": 58
            }
        },
        "Irrigated land": "NA (2008)"
    }
}

{
    "code": "ac",
    "name": "Antigua and Barbuda",
    "geo": {
        "Location": "Caribbean, islands between the Caribbean Sea and the North Atlantic Ocean, east-southeast of Puerto Rico",
        "Geographic coordinates": {
            "N": {
                "deg": 17,
                "min": 3
            },
            "W": {
                "deg": 61,
                "min": 48
            }
        },
        "Irrigated land": {
            "quantity": 1.3,
            "unit": "sq km"
        }
    }
}

Submit a SELECT * query to retrieve the documents.  See the attached screenshot.  ResultSet.getObject(columnIndex) returns the following errors for the first document:

Error: .getObject(10): NA (2008) is a primitive type; cannot retrieve the 'quantity' property from it.
Error: .getObject(11): NA (2008) is a primitive type; cannot retrieve the 'unit' property from it.

1 attachment

Issue #8424

Closed
Fixed
Resolved 2013-03-05T13:00:06Z
 
 
Completion
No due date
Fixed Build nosql-jdbc 1.0.0
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017