Coder Social home page Coder Social logo

bearcat-dao's Issues

many transaction problem

when developing using the transaction Aspect. it is useless if you use a one ...Transaction method within an other

currently i have a problem like line and dogs, where each dog has its line.
toimplement the createDogTransaction, i wanted to reuse the createLineTransaction Method.

but then I actually have two transactions

domainDaoSupport.js的一些疑问

不好意思,又来问了。
1.我看todo那个demo里model对应了一个domain,这个一定要建立吗?没看到bearcat-dao里有提到呢。
2.domainDaoSupport里的batchAdd有点不理解,如果我的mysql表主键id设置为自增长,为什么还需要一个叫做idgenerator的表来进行计数呢????

bearcat-dao context.json func路径问题

hi
bearcat-dao导入数据库表的json文件中,beans的func属性,如果node_modules目录和该json文件不在同一级目录,该属性值需要怎么修改,求教啊

比如:
context_test;json 在/usr/local/test/context_json 目录
node_modules在/usr/local/test目录

BeanBuilderUtil.buildObjecList问题

BeanBuilderUtil.buildObjectList = function(results, func, fields) {
var r = [];

for (var i = 0; i < results.length; i++) {
    var result = results[i];
    var beanObject = new func();

    for (var j = 0; j < fields.length; j++) {
        var field = fields[j];
        var name = field.getName();
        if (result[name]) {
                    //如果result[name]存的为int型数据,且为0,或者boolean型并且为false的话,是存在错误的,无法正常获取数据
            beanObject[name] = result[name];
        }
    }

    r.push(beanObject);
}

return r;

}

基于model的查询结果处理

  1. getListByWhere后返回的结果中有$mid$table等非数据属性,能够移除?
  2. 另外查询出的结果能够手动映射或自动映射为驼峰命名?
  3. $default的function如何使用,例如设置时间字段为当前时间?
  4. 如果基于model执行save操作,字段为空且没有设置$default的话会把$type这些作为值存入数据库,必须指定default,能够优化?
  5. 基于model的update会全量update,导致没有传入的字段为空,能否优化?

bearcat-dao 如何返回自增id?

我的表主键id设为自增,
然后用add方法和batchAdd方法添加数据的时候,返回的信息中,为什么id都是entity里的0?
如何才能返回数据本身的自增id?
不会是需要插入后在查一遍吧??

this.domainDaoSupport.transaction(txStatus); 应该如何使用

DemoDao.prototype.transaction = function(txStatus){
this.domainDaoSupport.transaction(txStatus);
return this;
}
这是我的dao .

this.demoDao.transaction(txStatus).update();
这是我在service中调用 , 我想知道 这个 txStatus是什么, 应该在哪获取 并传入 。

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.