orientechnologies / orientjs

The official fast, lightweight node.js client for OrientDB
http://orientdb.com
Other
326 stars 68 forks source link

Error on creating property with minimum value #353

Closed creisle closed 5 years ago

creisle commented 5 years ago

Version Information

OrientJS: v3.0.1 OrientDB: v3.0.6 node: v8.11.2

Steps to reproduce

I am currently migrating from code that was using 2.X.X to 3.X.X, I run into the following error when I try to create a property which has a minimum value.

const conf = {...} // my server settings etc
const odb = new OrientDBClient({
    host: conf.server.host,
    port: conf.server.port
});
const server = await odb.connect();
await server.createDatabase({name: conf.db.name, username: conf.server.user, password: conf.server.pass});
const db = await server.session({name: conf.db.name, username: conf.db.user, password: conf.db.pass});
const testclass = await db.class.create('testclass', 'V');
const prop = await testclass.property.create({name: 'testprop1', type: 'integer', min: 0});

Am I supposed to be using different syntax in v3.X.X ?

wolf4ood commented 5 years ago

Hi @creisle

it should be the same apis, let me check

wolf4ood commented 5 years ago

Hi @creisle

i've just pushed a fix. It will be available in the next OrientJS release

wolf4ood commented 5 years ago

Hi @creisle

OrientJS 3.0.2 is available on NPM with this fix. Thanks