zhazi 最近的时间轴更新
zhazi

zhazi

V2EX 第 208341 号会员,加入于 2016-12-29 23:03:16 +08:00
今日活跃度排名 8220
根据 zhazi 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
zhazi 最近回复了
22 小时 29 分钟前
回复了 ZekeChin 创建的主题 ? 程序员 ? "动态"编程逻辑:这种灵活性的合理性有多大
赞同 7 楼所说的
可能是这个提出问题的人抽象的不到位,所以写出了不灵活的代码
打个比方
你们是一家做平台的公司,
要与客户来对接,
你的第一个客户定义了的名称需要用 user.full_name
你的第二个客户定义了的名称需要用 user.first_name 和 last_name
你的建模是客户如何描述他的业务字段,而不是判断客户的字段
你的建模定义为

客户 1
field:'name'
column_name:name_str
type: string
value:'zhangsan'

客户 2
field:'name'
column_name:name_obj
type: object
value:{'first_name':'zhang','last_name':'san'}
通过 type 统一了两个客户对象的建模,不需要写出 if column_name == full_name 这种代码
水平差,冤框架。让上代码也不上,block
@XiaoJiang9527 晒代码,别虚空打靶
/*
* Copyright (c) 2008, 2019 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/

// Contributors:
// Linda DeMichiel - 2.1
// Linda DeMichiel - 2.0


package javax.persistence;

/**
* Defines strategies for fetching data from the database.
* The <code>EAGER</code> strategy is a requirement on the persistence
* provider runtime that data must be eagerly fetched. The
* <code>LAZY</code> strategy is a hint to the persistence provider
* runtime that data should be fetched lazily when it is
* first accessed. The implementation is permitted to eagerly
* fetch data for which the <code>LAZY</code> strategy hint has been
* specified.
*
* <pre>
* Example:
* &#064;Basic(fetch=LAZY)
* protected String getName() { return name; }
* </pre>
*
* @see Basic
* @see ElementCollection
* @see ManyToMany
* @see OneToMany
* @see ManyToOne
* @see OneToOne
* @since 1.0
*/
public enum FetchType {

/** Defines that data can be lazily fetched. */
LAZY,

/** Defines that data must be eagerly fetched. */
EAGER
}

不看文档,不查手册的吐槽我不是很认可
求一个码用
104 天前
回复了 firhome 创建的主题 ? Windows ? 如何让 windows 命令行如 mac 般丝滑?
windows 的盘符和目录转义符让我完全没兴趣用它的 terminal
104 天前
回复了 godruoyi 创建的主题 ? PHP ? 为什么 Laravel 这么优秀
我喜欢 Laravel
不喜欢这篇文章。
兼听则明,偏信则暗,没有对比就说一个框架如何如何优雅优秀是不够客观的
105 天前
回复了 Canglin 创建的主题 ? Java ? 有没有什么推荐的 Java 书籍
像编码量比较少还是多实践吧,多写一些应用代码。多看官方 guide ,
找本整洁代码读读。
太深入了的体会不到,太肤浅的不如自己实践。
这个么一个小 kit 和整个 spring 生态做耦合,里面还塞了一个 hutool 的大杂烩,也没有测试
麻烦了,兄弟,你自己处理是管理员还是用户想给啥权限给啥权限,整个菜单表都给你
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   6048 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 01:44 · PVG 09:44 · LAX 18:44 · JFK 21:44
Developed with CodeLauncher
? Do have faith in what you're doing.


http://www.vxiaotou.com