Git Product home page Git Product logo

koa-orm's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar helloyou2012 avatar stephan48 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

koa-orm's Issues

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

实例hook无效

我在controllers层中的方法

const { game } = ctx.orm()
game.beforeDestroy(activity=>{
    activity.IS_DELETE = 0
})

删除的没有没有执行hook

An in-range update of sequelize is breaking the build 🚨

Version 4.5.0 of sequelize just got published.

Branch Build failing 🚨
Dependency sequelize
Current Version 4.4.10
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

sequelize is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • coverage/coveralls Coverage pending from Coveralls.io Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v4.5.0

4.5.0 (2017-08-15)

Features

  • dependency: move env-cmd to dev dependencies (#8116) (615e95f2)
Commits

The new version differs by 2 commits.

  • 8de9a27 build: use node 4 for release
  • 615e95f feat(dependency): move env-cmd to dev dependencies (#8116)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Model

How do you declare a model with this ORM?

Deprecated: sequelize.import

hello,
has you can see here sequelize.import is deprecated.
I would like to use the extends model with the init function.

So can you replace the import function use in /lib/models.js ?

const model = sequelize.import(join(modelPath, file));
models[model.name] = model;

With this :

        let loadedModel = require(join(modelPath, file));
        if (loadedModel.prototype && typeof loadedModel.prototype === 'object') {
          // ES6 module compatibility with init
          let modelES6 = loadedModel.init(sequelize, sequelize.Sequelize.DataTypes);
          models[modelES6.name] = modelES6;
        }
        else{
          if (typeof loadedModel === 'object') {
            // ES6 module compatibility with default like sequelize.import
            loadedModel = loadedModel.default;
          }
          let model = loadedModel(sequelize, sequelize.Sequelize.DataTypes);
          models[model.name] = model;
        }

Another thing, you can filter the models for association detection like this :

  Object.values(models)
    .filter(model => typeof model.associate === 'function')
    .forEach(model => model.associate(models));

Sequelize 5 changes some configs of pool connection

Sequelize v3 is using

pool: {
    maxConnections: 10,
    minConnections: 0,
    maxIdleTime: 30000
  }

But v4 and v5 is changed into this

  pool: {
    max: 5,
    min: 0,
    acquire: 30000,
    idle: 10000
  }

So, old configs params will not works if upgrade to v4, v5.

modal name undefind

modal

let Game = db.define('modelName', {
    id:  { type: 'serial', key: true },
    game_name: { type:'text',size:40 },
    game_code: { type:'text',size:20 },
    game_desc: { type: 'text' },
    preview_pic: { type: 'text'},
    preview_link: { type:'text'},
    game_logo: { type:'text'},
    user_launch: { type:'integer'},
    game_type: { type:'integer'},
    defaultconfig: { type:'text'},
    lottery_platform: { type:'integer'}
  });

ctx.orm 属性打印出来

undefined: 
   { id: [Getter/Setter],
     game_name: [Getter/Setter],
     game_code: [Getter/Setter],
     game_desc: [Getter/Setter],
     preview_pic: [Getter/Setter],
     preview_link: [Getter/Setter],
     game_logo: [Getter/Setter],
     user_launch: [Getter/Setter],
     game_type: [Getter/Setter],
     defaultconfig: [Getter/Setter],
     lottery_platform: [Getter/Setter] } }

ctx.orm(...).findAll is not a function

app.use(async function (ctx) {
  // const raws = await .sql.select().from('yhd_fn_game').query();
  console.log(ctx.orm('test'));

  const products = await ctx.orm().findAll({
    where: { id:6 }
  });
  ctx.body = products;
});

报错 ctx.orm(...).findAll is not a function

用法问题吗

Postgresql

Can this ORM be used to talk to Postgresql using async/await?

An in-range update of sequelize is breaking the build 🚨

Version 4.11.4 of sequelize just got published.

Branch Build failing 🚨
Dependency sequelize
Current Version 4.11.3
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

sequelize is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • coverage/coveralls Coverage pending from Coveralls.io Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v4.11.4

4.11.4 (2017-09-29)

Bug Fixes

  • model: properly serialize WHERE attributes in soft delete (#8383) (ba7aa33)
Commits

The new version differs by 1 commits.

  • ba7aa33 fix(model): properly serialize WHERE attributes in soft delete (#8383)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.0.2 to 6.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/mocha-6.1.0 at 100.0% (Details).

Release Notes for v6.1.0

6.1.0 / 2019-04-07

🔒 Security Fixes

  • #3845: Update dependency "js-yaml" to v3.13.0 per npm security advisory (@plroebuck)

🎉 Enhancements

  • #3766: Make reporter constructor support optional options parameter (@plroebuck)
  • #3760: Add support for config files with .jsonc extension (@sstephant)

📠 Deprecations

These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:

🐛 Fixes

  • #3829: Use cwd-relative pathname to load config file (@plroebuck)
  • #3745: Fix async calls of this.skip() in "before each" hooks (@juergba)
  • #3669: Enable --allow-uncaught for uncaught exceptions thrown inside hooks (@givanse)

and some regressions:

📖 Documentation

🔩 Other

  • #3830: Replace dependency "findup-sync" with "find-up" for faster startup (@cspotcode)
  • #3799: Update devDependencies to fix many npm vulnerabilities (@XhmikosR)
Commits

The new version differs by 28 commits.

  • f4fc95a Release v6.1.0
  • bd29dbd update CHANGELOG for v6.1.0 [ci skip]
  • aaf2b72 Use cwd-relative pathname to load config file (#3829)
  • b079d24 upgrade deps as per npm audit fix; closes #3854
  • e87c689 Deprecate this.skip() for "after all" hooks (#3719)
  • 81cfa90 Copy Suite property "root" when cloning; closes #3847 (#3848)
  • 8aa2fc4 Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
  • 586bf78 Update JS-YAML to address security issue (#3845)
  • d1024a3 Update doc examples "tests.html" (#3811)
  • 1d570e0 Delete "/docs/example/chai.js"
  • ade8b90 runner.js: "self.test" undefined in Browser (#3835)
  • 0098147 Replace findup-sync with find-up for faster startup (#3830)
  • d5ba121 Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
  • a3089ad update package-lock
  • 75430ec Upgrade yargs-parser dependency to avoid loading 2 copies of yargs

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error: field value not support Date

squel.registerValueHandler(Date, function(date) {
  return '"' + date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate() + '"';
});

An in-range update of mysql2 is breaking the build 🚨

The devDependency mysql2 was updated from 1.6.1 to 1.6.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mysql2 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/mysql2-1.6.2 at 100.0% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sequelize is breaking the build 🚨

Version 4.7.1 of sequelize just got published.

Branch Build failing 🚨
Dependency sequelize
Current Version 4.7.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

sequelize is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • coverage/coveralls Coverage pending from Coveralls.io Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v4.7.1

4.7.1 (2017-08-23)

Bug Fixes

  • instance: toJSON should return cloned version of internal object (#8171) (fc942b0)
Commits

The new version differs by 2 commits.

  • fc942b0 fix(instance): toJSON should return cloned version of internal object (#8171)
  • d4b8212 docs(models-definitions): Fix wrong url for configuration section (#8168)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

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.