惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - 五味果

.net Core 调用微信Jsapi接口,H5解析二维码 TextBoxFor控件的扩展---Bootstrap在mvc上的应用 Dapper Vs Dbentry 外地手机号码,请在号码前加拨0 Sql 2012 远程数据库连接 DbEntry在Vs2012里的配置 终点,也是新的起点! 天气预报数据查询接口 关于浏览器账号的一个愿望 关于移动,联通,电信的区分。 - 五味果 - 博客园 被#号折腾了。 利用反射,泛型,静态方法快速获取表单值到Model。 subsonic sqlite 路径问题 - 五味果 ORM是工具,工具是用来提高开发速度的。 基于XML的后台管理系统--设想 项模板的使用--提高编程速度 C#开发编码规范 基于Jquery的内容显示模块 - 五味果 - 博客园 IIS7下运行Access+Asp的解决方法
Orm 请别让数据库中的默认值形同虚设!!
五味果 · 2009-09-18 · via 博客园 - 五味果

没有最懒,只有更懒。
用orm就是为了偷懒,那你在我新增一条记录的时候,还必须对在数据库中已经设置了默认值的列还要赋值呢?我所见到Orm都犯了一个毛病,生成插入insert语句的时候都是一个列不拉的都进行一次赋值,导致数据库列上设置的默认值全都形同虚设!
生成insert语句的时候请智能一些,只指定用户赋值的列,不要遍历表的所有列。
不知道这个发首页合适不,不合适请撤下,希望orm设计者能改进下,能让广大orm使用者都少写几行代码。