Home >Database >Mysql Tutorial >DAO保存时间到Oracle数据库无小时分钟

DAO保存时间到Oracle数据库无小时分钟

WBOY
WBOYOriginal
2016-06-07 17:19:431539browse

LAST_UPDATE_DATE DATE not null, LAST_UPDATED_BY VARCHAR2(20) not null, CREATION_DATE DATE not nu

LAST_UPDATE_DATE       DATE not null,
  LAST_UPDATED_BY        VARCHAR2(20) not null,
  CREATION_DATE          DATE not null,
  CREATED_BY             VARCHAR2(20) not null,

Oracle表的定义

通过 myeclipse for Spring 自动hibernate Revse,生成带注解的PO对象

 @Temporal(TemporalType.TIMESTAMP)
 @Column(name = "CREATION_DATE", nullable = false, length = 7)
 public Date getCreationDate() {
  return this.creationDate;
 }

将DATE改成TIMESTAMP就能保存时间到数据库,具体原因不深究

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn