New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

waterline-schema

Package Overview
Dependencies
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waterline-schema - npm Package Compare versions

Comparing version 1.0.0-18 to 1.0.0-19

10

lib/waterline-schema/schema.js

@@ -250,2 +250,7 @@ // ██████╗ ██╗ ██╗██╗██╗ ██████╗

if (_.has(attribute, 'allowNull') && attribute.allowNull === true) {
// Check the attribute isn't an association
if (_.has(attribute, 'model') || _.has(attribute, 'collection')) {
throw new Error('The attribute `' + attributeName + '` on the `' + collection.identity + '` model contains invalid properties. The `allowNull` flag may not be used on attributes that represent associations. For singular associations `null` is allowed by default.');
}
// Check type isn't a ref or json type

@@ -256,7 +261,2 @@ if (attribute.type.toLowerCase() === 'json' || attribute.type.toLowerCase() === 'ref') {

// Check the attribute isn't an association
if (_.has(attribute, 'model') || _.has(attribute, 'collection')) {
throw new Error('The attribute `' + attributeName + '` on the `' + collection.identity + '` model contains invalid properties. The `allowNull` flag may not be used on attributes that represent associations. For singular associations `null` is allowed by default.');
}
// Check the attribute isn't a primaryKey

@@ -263,0 +263,0 @@ if (collection.primaryKey === attributeName) {

{
"name": "waterline-schema",
"description": "The core schema builder used in the Waterline ORM.",
"version": "1.0.0-18",
"version": "1.0.0-19",
"dependencies": {

@@ -6,0 +6,0 @@ "@sailshq/lodash": "^3.10.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc