Skip to content

unknown property types #305

@ghazel

Description

@ghazel

My model has a column of type "geography(Point)" (from the PostGis extension for postgresql).

However when I try to define:

db.define("place", { name: String, location:'geography(Point)' })

I get:

/project/node_modules/orm/lib/Property.js:34
        throw ErrorCodes.generateError(ErrorCodes.NO_SUPPORT, "Unknown property type
                         ^
Error: Unknown property type: geography(Point)
    at Object.defineProperty.value (/project/node_modules/orm/lib/ErrorCodes.js:12:13)
    at Object.exports.normalize (/project/node_modules/orm/lib/Property.js:34:20)
    at new Model (/project/node_modules/orm/lib/Model.js:173:33)
    at ORM.define (/project/node_modules/orm/lib/ORM.js:208:22)
    at csv.from.path.on.name (/project/cities.js:15:20)
    at /project/node_modules/orm/lib/ORM.js:121:13
    at null.<anonymous> (/project/node_modules/pg/lib/client.js:134:7)
    at g (events.js:175:14)
    at EventEmitter.emit (events.js:117:20)
    at Socket.<anonymous> (/project/node_modules/pg/lib/connection.js:89:12)

How do I make orm work with types it doesn't know about? (I intend on writing the relevant where clauses by hand).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions