Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrientDB.RequestError on update #43

Closed
dmarcelino opened this issue Feb 18, 2015 · 3 comments
Closed

OrientDB.RequestError on update #43

dmarcelino opened this issue Feb 18, 2015 · 3 comments

Comments

@dmarcelino
Copy link
Member

Post

module.exports = {

  attributes: {
    title: {
        type: 'string'
    },
    slug: {
        type: 'string'
    },
    editorialPriority: {
        type: 'string'
    },
    sectionPriority: {
        type: 'string'
    },
    html: {
        type: 'string'
    },
    editor_html: {
        type: 'string'
    },
    featureImage: {
        model: 'image'
    },
    area: {
        type: 'string'
    },
    excerpt: {
        type: 'string'
    },
    content: {
        type: 'string',
    },
    publicationDate: {
        type: 'datetime'
    },
    categories:{
        collection: 'category',
        through: 'post_category',
        via: 'post',
        dominant: true
    },
    author:{
        model:'author'
    },
    status:{
        model:'postStatus'
    },
    address: {
        type: 'string'
    },
    addressReference: {
        type: 'string'
    },
    latitude: {
        type: 'float'
    },
    longitude: {
        type: 'float'
    }
  }
}

Image

module.exports = {

  attributes: {
    file: {
        type: 'json',
        isFile: true,
        required: true
    },
    footer: {
        type: 'string'
    },
    author: {
        model: 'author'
    },
    area: {
        type: 'string'
    },
    isCrop: {
        type: 'boolean'
    },
    parent: {
        model: 'image'
    },
    crops: {
        collection: 'image',
        via: 'parent'
    }
  }
};

Error:

{ error: 'E_UNKNOWN',
  status: 500,
  summary: 'Encountered an unexpected error',
  raw: 
   { name: 'OrientDB.RequestError',
     message: 'Error on execution of command: sql.select from image WHERE   @rid = #15:0',
     data: {},
     previous: [ [Object] ],
     id: 1,
     type: 'com.orientechnologies.orient.core.exception.OCommandExecutionException',
     hasMore: 1,
     __stackCleaned__: true } }

Raised by @rodrigorn on ☝️ February 13 2015 11:20 PM

Related: stackoverflow.com: Node.js waterline-orientdb update fail

@dmarcelino
Copy link
Member Author

Hi @rodrigorn,

Regarding my previous comment on gitter:

I encourage you to further checkout branch 43-OrientDB_RequestError and try to reproduce the issue
then it will be easier to help you
the only other thing we haven't tried is exposing waterline-orientdb logs. You can do that by adding the DEBUG env variable in your console such as export DEBUG=$DEBUG,waterline-orientdb:*. Try that and see if you get any ERRORs in the console.

Have you had a chance to try any of that?

@dmarcelino
Copy link
Member Author

@rodrigorn, I was able to reproduce stackoverflow.com: Node.js waterline-orientdb update fail issue which was similar to yours. I've confirmed that with current master's code it's breaking. The good news is that future v0.10.40 branch seems to fix it. Would you mind give it a go and see if it fixes your issue as well?

npm install appscot/waterline-orientdb#refactor_collection

Just be careful to use migrate: safe.

@dmarcelino
Copy link
Member Author

Fixed by #46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant