Giter Club home page Giter Club logo

hapi-waterline's Introduction

Pencroff.com

Hi. I am Sergii.

This is repository for my portfolio / CV web-site.

You will have better experience if just open pencroff.com

hapi-waterline's People

Contributors

mickelindahl avatar pencroff avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hapi-waterline's Issues

Support for hapi v17

Hi,

Thanks for a simple and good plugin :-). Love it

Hapi have released a version v17 where they among others remove all callback functionality and replace is with async/await, see the change log. This is a breaking change making. Thus the plugin needs to be updated to accommodate these changes. I can do this and the submit a pull request. Would that be okey for you?

Cheers
Mikael

issues in Model Attribute properites

not accepting model properties such as , isEmail, isIn , and more , please find the error am getting .

userError: The attribute platform on the usersession model contains invalid properties. The property isIn isn't a recognized property.
at parseProperties (D:\MCT\APIServer\node_modules\waterline-schema\lib\waterline-schema\schema.js:239:48)
at D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:3253:15
at baseForOwn (D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:2223:14)
at D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:3223:18
at Function. (D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:3526:13)
at parseAttributes (D:\MCT\APIServer\node_modules\waterline-schema\lib\waterline-schema\schema.js:237:9)
at D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:3253:15
at baseForOwn (D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:2223:14)
at D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:3223:18
at Function. (D:\MCT\APIServer\node_modules@sailshq\lodash\lib\index.js:3526:13)
at normalizeCollection (D:\MCT\APIServer\node_modules\waterline-schema\lib\waterline-schema\schema.js:158:7)

===============================================================

and this is my model definition

module.exports = {

identity: 'usersession',

primaryKey: 'id',

datastore: 'mct_user_management',

attributes: {
    id: { type: 'string', autoMigrations: { autoIncrement: true }, columnName: '_id' },
    createdAt: { type: 'string', autoCreatedAt: true, },
    isActive: { type: 'boolean', defaultsTo: true },
    platform: { type: 'string', isIn: ['web', 'mobile'], defaultsTo:'mobile' }

},

};

Similar plugin exists, possibly merge APIs

Hi! We've both created a very similar plugin– mine is called dogwater. Maybe we can work-out a merging of features or something. I'm not sure the best way to approach this, honestly! I'd love to foster a Waterline community within the hapi ecosystem–I think it could be very great for the larger Waterline community, and also great for the hapi ecosystem, which doesn't have many offerings for ORM integrations. To start, here's a rundown of the differences between our plugins. Feel free to include anything I've missed.

hapi-waterline does, dogwater doesn't

  • expose the ORM itself and databases directly on the plugin
  • decorate the server with a getModel method
  • allow a directory or array of directories to be passed for model definitions
  • provide a reset method for testing

dogwater does, hapi-waterline doesn't

  • have an option to load fixtures
  • expose models to request object
  • allow adapters to be passed as strings for use with rejoice
  • allow multiple Waterline instantiations to exist (on different servers, for example)
  • support and have tests for both hapi7 and hapi8
  • work with other hapi plugins like bedwetter
  • decorate the server with a getWaterline method
  • allow a file or array to be passed for model definitions
  • optionally pass Waterline to model definitions for use in lifecycle callbacks

Also, here are some Waterline/hapi plugins of mine that you might find useful,
https://www.npmjs.com/package/bedwetter
https://www.npmjs.com/package/waterline-to-boom
https://www.npmjs.com/package/waterline-fixtures

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.