Giter VIP home page Giter VIP logo

Comments (2)

caibirdme avatar caibirdme commented on July 24, 2024

不支持外键。关联查询属于复合查询,需要连表查,这个时候最好还是自己写sql。即使使用ORM,涉及到多表查询,还通过外键关联时,你很可能不知道最终的sql长什么样(当然你也可以不在乎…)。不过从可维护性的角度来说,我个人还是建议你这种复杂sql还是用NamedQuery来写手。至于外键,通常情况下我不建议使用物理外键,因为随着数据量的增加,你的数据库可能分布在多节点不同实例上,这时候没法物理外键了。逻辑外键的话,可能需要加上注释来表明表之间的关系

from gendry.

Colstuwjx avatar Colstuwjx commented on July 24, 2024

明白了!

from gendry.

Related Issues (20)

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.