Open IgorRosocha opened 5 years ago
I have the same error, have you found solution?
I have the same error, have you found solution?
The only way that worked for me was to create a struct for geometry
in my model and then save the whole geometry
json as a database column, so the code looks like this:
/// A representation of Geometry
struct Geometry: Content {
/// Type of Geometry object
let type: String
/// Coordinates of Geometry object
let coordinates: [[[Double]]]
}
/// Geometry of Feature
var geometry: Geometry
@IgorRosocha This looks to be supported in the latest beta release. In my migrations I can do .array(of: .array(of .json)) and it seems to be working.
I have been trying to parse a GeoJSON, which has a multidimensional array
coordinates
, example:I'm having problem of saving multidimensional
coordinates
of type[[[Double]]]
as a column into my database (which is described in my PosgtreSQLModel). In the DDL of created database, it has typejsonb[]
, and when I try to save it, I getPostgreSQLError.server.error.array_recv: wrong element type
. It would be really great if the support for multidimensional arrays would be available.