Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Ben Fonarov
    @kurbsdude hey there
    so in regards to query, keep in mind that if you're running that in the model, then you'll need to use User.adapter.query instead of User.query due to some weirdness with waterline and sails 0.9.16
    I don't know if you're using 0.10 though, and if you are, let me know and I'll need to look into it (but you'll probably still need to use User.adapter.query
    the second issue is that if you are returning res.json in the model, then the model has no understanding of what res is
    as for required:true and syncable:true - those aren't a great fit for a nosql db like neo4j. I can't tell you that required:true will work in the way you expect it to. But we'll have to consider how that might work...
    same with syncable: true
    also, if you have some ideas, please feel free to share and we might implement them, or ask for a pull request
    unique is different, it'll probably map to a neo4j constraint, but that means you'll get an error when trying to create something not unique, and will need to handle it
    any questions you have, feel free to ask, not a problem :)

    To make this work with User.query, I changed your adapter.js file a little, I don't know if it is the right way of doing this
    I changed query: query to something like

    query: function(collectionName, q, params, cb){
            query(q, params, cb, true);

    It would be great if attributes checks like the following could be used: (for example the following attributes work with other database adapters out there)

    attributes: {
         username: {
            type: "string",
              required: true,
          name: {
            type: "string",
              required: true
          password: {
            type: "string",
              required: true
          email: {
            type: "string",
              email: true,
              required: true,

    For example while registering a user, it would be nice to have a required:true, giving errors for empty fields


    or attributes could also have something like

    toJSON: function(){
             var obj = this.toObject();
              delete obj.password;
              return obj;


    beforeCreate: function(values, next) {
              //do something ();
    basically it would be nice to understand how to use validations shown in http://sailsjs.org/#!documentation/models for this adapter :)
    are you guys still working on this project?
    and I just took a look at the adapter file and the whole file is so thin,
    is this project currently suitable for production usage or development only?
    would you please release a minimal viable README file to let us know
    what's the current situation of this project and how could I use it?
    Thanks a lot that someone is working on neo4j adapter and I know it's hard to
    get both development and documentation done both in short time,
    but I really need some basic understanding of
    how the relationship is mapped to sails' ORM
    and design my data modeling, hope you can give me some clues.
    Ben Fonarov
    @roackb2 hey there, we are still working on it indeed... just trying to fit it in with all the other priorities... if you'd like, I can help you here directly, and we welcome any pull requests to help us out :)
    Arunram Kalaiselvan
    This message was deleted
    This message was deleted
    This message was deleted
    Arunram Kalaiselvan
    This message was deleted
    Michael Mealling
    Are there any applications that use this package? Something that can let us know how to use it would be really helpful.
    Is this module supports sails 0.11?
    i am getting errors
    I think this module not production ready and in still development
    Hi Guys, I was pleased to find someone who was building a sails adapter for neo4j. I managed to get it working, needed to mod the returned results from the find function though so it is returned in the format expected. I see you have it commented out, so wasn't too much of an issue to get it working. Once I got it running I was able to add users through my app. It uses passports and this is where it got interesting. I was hoping to see my passport nodes created and have edges to my users, but this wasn't the case. So my question is, are there any plans for edges/relationships?
    Alexis Hope
    Anyone know what neo4j version this adapter is written for?
    Sri Hari Raju Penmatsa
    @Chuwiey , thank you for starting the development for this adapter. Are you still developing this adapter? I could see that there is no github activity since February. If you are still actively developing this, could you post a rough estimate about when you can publish again and what other support can we expect from the new adapter?
    Charl Meyers
    This message was deleted

    I am having problems getting data from the database, but it is adding data correctly. I am using sails normal findOne method

    login: function (req, res) {

    // Try to look up user using the provided email address
      email: req.param('email')
    }, function foundUser(err, user) {
      if (err) return res.negotiate(err);
      if (!user) return res.notFound();
      // Compare password attempt from the form params to the encrypted password
      // from the database (`user.password`)
        passwordAttempt: req.param('password'),
        encryptedPassword: user.encryptedPassword
        error: function (err){
          return res.negotiate(err);
        // If the password from the form params doesn't checkout w/ the encrypted
        // password from the database...
        incorrect: function (){
          return res.notFound();
        success: function (){
          // Store user id in the user session
          req.session.me = user.id;
          // All done- let the client know that everything worked.
          return res.ok();


    But it does not seem to be getting any data

    how to install sails-neo4j
    Andreas Gräf
    This message was deleted
    I'm with the same situation 'HOW DO I INSTALL SAILS-NEO4J...???', there're nothing about it